Skip to content

Commit

Permalink
Updated docker action
Browse files Browse the repository at this point in the history
  • Loading branch information
leoafarias committed Aug 26, 2024
1 parent 21332ba commit 7bb641e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 10 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,18 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Get and modify tag name
id: get_tag_name
run: |
# Extract the tag name
TAG_NAME=${ github.event.release.tag_name }
# Remove 'v' from the beginning of the tag name, if present
MODIFIED_TAG_NAME=${TAG_NAME#v}
# Set the modified tag name as an output
echo "modified_tag_name=$MODIFIED_TAG_NAME" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

Expand All @@ -112,4 +124,4 @@ jobs:
with:
file: ./.docker/Dockerfile
push: true
tags: leoafarias/fvm:{{ github.event.release.tag_name }}
tags: leoafarias/fvm:{{ steps.get_tag_name.outputs.modified_tag_name}}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 3.2.1

* fix: `--fvm-skip-input` flag not applying to context
* add: `fvm list` now displays the cache path even if no version is installed

## 3.2.0

Expand Down
18 changes: 9 additions & 9 deletions lib/src/commands/list_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import 'package:mason_logger/mason_logger.dart';

import '../services/cache_service.dart';
import '../services/global_version_service.dart';
import '../services/project_service.dart';
import '../services/logger_service.dart';
import '../services/project_service.dart';
import '../services/releases_service/models/version_model.dart';
import '../services/releases_service/releases_client.dart';
import '../utils/context.dart';
Expand All @@ -27,14 +27,6 @@ class ListCommand extends BaseCommand {
Future<int> run() async {
final cacheVersions = await CacheService.fromContext.getAllVersions();

if (cacheVersions.isEmpty) {
logger
..info('No SDKs have been installed yet. Flutter. SDKs')
..info('installed outside of fvm will not be displayed.');

return ExitCode.success.code;
}

final directorySize = await getFullDirectorySize(cacheVersions);

// Print where versions are stored
Expand All @@ -43,6 +35,14 @@ class ListCommand extends BaseCommand {
..info('Directory Size: ${formatBytes(directorySize)}')
..spacer;

if (cacheVersions.isEmpty) {
logger
..info('No SDKs have been installed yet. Flutter. SDKs')
..info('installed outside of fvm will not be displayed.');

return ExitCode.success.code;
}

final releases = await FlutterReleasesClient.getReleases();
final globalVersion = GlobalVersionService.fromContext.getGlobal();
final localVersion = ProjectService.fromContext.findVersion();
Expand Down

0 comments on commit 7bb641e

Please sign in to comment.