Skip to content

Commit

Permalink
version bump and fvm config path adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
leoafarias committed Jul 27, 2020
1 parent c271ac1 commit 354d4f8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.1.4

- Nested FVM config look up, to be used on monorepo projects, or nested directories.
- Added link to changelog on upgrade message.

## 1.1.3

- Removed Flutter project guard from flutter proxy command
Expand Down
14 changes: 4 additions & 10 deletions lib/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ final kFvmDirectory = Platform.script.toString();
final kWorkingDirectory = Directory.current;

/// Local Project Directory
final kProjectFvmDir =
Directory(path.join(_getProjectFvmDir().path, kFvmDirName));
final kProjectFvmDir = _getProjectFvmDir();

// Local project look up on nested project folders (monorepo)
Directory _getProjectFvmDir({Directory dir}) {
Expand All @@ -25,17 +24,12 @@ Directory _getProjectFvmDir({Directory dir}) {

if (flutterProjectDir.existsSync()) return flutterProjectDir;
// Return working directory if it has reached root
if (isRootDir) return kWorkingDirectory;
if (isRootDir) {
return Directory(path.join(kWorkingDirectory.path, kFvmDirName));
}
return _getProjectFvmDir(dir: dir.parent);
}

Directory getProjectPath(Directory dir) {
var dir = kProjectFvmDir;

if (dir.existsSync()) return dir;
return getProjectPath(dir.parent);
}

/// Local Project Config
final kProjectFvmConfigJson =
File(path.join(kProjectFvmDir.path, 'fvm_config.json'));
Expand Down
2 changes: 1 addition & 1 deletion lib/src/version.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: fvm
description: A simple cli to manage Flutter SDK versions per project. Support channels, releases, and local cache for fast switching between versions.
version: 1.1.3
version: 1.1.4
homepage: https://github.com/leoafarias/fvm

environment:
Expand Down

0 comments on commit 354d4f8

Please sign in to comment.