From 305584a20d86248627d616bc46c1b77cc35a596e Mon Sep 17 00:00:00 2001 From: Leo Farias Date: Wed, 28 Feb 2024 15:36:04 -0500 Subject: [PATCH 1/8] Removed test workflow --- .github/workflows/test.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4cce3fd4..e222dac4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,11 +40,13 @@ jobs: - name: Install DCM uses: CQLabs/setup-dcm@v1 + if: github.repository == 'leoafarias/fvm' with: github_token: ${{ secrets.GITHUB_TOKEN }} - name: Run DCM uses: CQLabs/dcm-action@v1 + if: github.repository == 'leoafarias/fvm' with: github_token: ${{ secrets.GITHUB_TOKEN }} ci_key: oss @@ -87,13 +89,4 @@ jobs: sdk-version: ${{ github.event.inputs.sdk-version }} - name: Tests - uses: ./.github/actions/test - - linkinator: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: JustinBeckwith/linkinator-action@v1 - with: - concurrency: 3 - markdown: true \ No newline at end of file + uses: ./.github/actions/test \ No newline at end of file From e1e8fbcc8e07c419380452ec94690b75751ad0f0 Mon Sep 17 00:00:00 2001 From: Leo Farias Date: Wed, 28 Feb 2024 15:46:36 -0500 Subject: [PATCH 2/8] Update docs --- .../getting-started/configuration.mdx | 18 +++++++++-- lib/src/utils/deprecation_util.dart | 31 ------------------- 2 files changed, 16 insertions(+), 33 deletions(-) diff --git a/docs/pages/documentation/getting-started/configuration.mdx b/docs/pages/documentation/getting-started/configuration.mdx index 164bfe46..27ba0ade 100644 --- a/docs/pages/documentation/getting-started/configuration.mdx +++ b/docs/pages/documentation/getting-started/configuration.mdx @@ -4,6 +4,7 @@ title: Configuration --- import { Callout } from "nextra/components"; +import { FileTree } from "nextra/components"; # Configuration @@ -30,12 +31,12 @@ This contains version linked to the project. This file is automatically created } ``` +- `flutter`: The version of the Flutter SDK to be used, falling back to the flutter value if not explicitly set. - `cachePath`: Defines the path to the project's cache directory. - `useGitCache`: (default: true) Indicates whether the Git cache is used for dependencies. - `gitCachePath`: Sets the path to the Git cache directory, applicable if useGitCache is true. - `flutterUrl`: Specifies the URL to the Flutter SDK repository. - `priviledgedAccess`:(default: true) Determines if configurations requiring elevated permissions are enabled. -- `flutterSdkVersion`: The version of the Flutter SDK to be used, falling back to the flutter value if not explicitly set. - `flavors`: A map defining custom project flavors for different configurations. - `updateVscodeSettings`: (default: true) Flags whether to auto-update VS Code settings on configuration changes. - `updateGitIgnore`: (default:true) Indicates whether to auto-update the .gitignore file based on project configurations. @@ -45,8 +46,21 @@ This contains version linked to the project. This file is automatically created Inside the directory you will find the following files and directories: + + + + + + + + + + + + + - **flutter_sdk** - Symlink to the Flutter SDK version linked to the project. -- **versions/[version]** - Directory containing the Flutter SDK versions. This is similar to flutter_sdk, but is used for better VsCode compatibility. +- **versions** - Directory containing the Flutter SDK versions. This is similar to flutter_sdk, but is used for better VsCode compatibility. - **fvm_config.json** - (deprecated) This is a legacy configuration file. - **release** - (internal use only) File containing the release version of FVM. - **version** - (internal use only) File containing the version of FVM. diff --git a/lib/src/utils/deprecation_util.dart b/lib/src/utils/deprecation_util.dart index 6deada26..8db92a7b 100644 --- a/lib/src/utils/deprecation_util.dart +++ b/lib/src/utils/deprecation_util.dart @@ -42,37 +42,6 @@ void deprecationWorkflow() { } } -// Future _migrateVersionSyntax() async { -// final versions = await CacheService.fromContext.getAllVersions(); - -// final oldVersions = versions.where((version) { -// final versionName = version.name; -// final versionParts = versionName.split('@'); -// if (versionParts.length > 1) { -// return true; -// } -// return false; -// }); - -// if (oldVersions.isEmpty) { -// return; -// } - -// logger.warn('You have a deprecated version / channel syntax. '); - -// for (var element in oldVersions) { -// logger -// ..info(element.name) -// ..spacer -// ..info('Run: fvm remove ${element.name}}') -// ..spacer -// ..info('Then run: fvm install ${element.name.split('@').first}') -// ..info( -// 'if you need to force install a channel run: fvm install ${element.name.split('@').first} --channel beta', -// ); -// } -// } - // TODO: Removed on future version of the app // Deprecated on 3.0.0 void _warnDeprecatedEnvVars() { From 1820f265377251ec5ab275bbfa43186ad5c04f94 Mon Sep 17 00:00:00 2001 From: Leo Farias Date: Wed, 28 Feb 2024 16:31:12 -0500 Subject: [PATCH 3/8] Changed permission github action --- .github/workflows/test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e222dac4..8f2e5e2b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,6 +25,8 @@ jobs: name: Test timeout-minutes: 30 runs-on: ubuntu-latest + permissions: + issues: write steps: - name: Checkout uses: actions/checkout@v4 @@ -40,13 +42,11 @@ jobs: - name: Install DCM uses: CQLabs/setup-dcm@v1 - if: github.repository == 'leoafarias/fvm' with: github_token: ${{ secrets.GITHUB_TOKEN }} - name: Run DCM uses: CQLabs/dcm-action@v1 - if: github.repository == 'leoafarias/fvm' with: github_token: ${{ secrets.GITHUB_TOKEN }} ci_key: oss @@ -55,6 +55,9 @@ jobs: fatal_style: true fatal_performance: true fatal_warnings: true + + - name: Run DCM + run: dcm analyze lib - name: Install lcov run: sudo apt-get install lcov From 2026b92015ee10508c91038d770b2f03601e0992 Mon Sep 17 00:00:00 2001 From: Leo Farias Date: Wed, 28 Feb 2024 16:35:25 -0500 Subject: [PATCH 4/8] Update permissions --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8f2e5e2b..eaed2160 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,9 +24,11 @@ jobs: test: name: Test timeout-minutes: 30 - runs-on: ubuntu-latest permissions: issues: write + contents: read + pull-requests: write + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 From 7640cb24736a0cfc4b7e7e62d66e98bd2fbfbce1 Mon Sep 17 00:00:00 2001 From: Leo Farias Date: Wed, 28 Feb 2024 16:46:07 -0500 Subject: [PATCH 5/8] Action change --- .github/workflows/test.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eaed2160..e2a7da43 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,8 @@ on: - "docs/**" - "README.md" - "CHANGELOG.md" - - ".github/**" + +permissions: write-all concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -24,10 +25,6 @@ jobs: test: name: Test timeout-minutes: 30 - permissions: - issues: write - contents: read - pull-requests: write runs-on: ubuntu-latest steps: - name: Checkout From b8c778e07fb271c679daf9190ceeba6c049897a3 Mon Sep 17 00:00:00 2001 From: Leo Farias Date: Wed, 28 Feb 2024 17:01:32 -0500 Subject: [PATCH 6/8] Github action change --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e2a7da43..259fb8a6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,8 +15,6 @@ on: - "README.md" - "CHANGELOG.md" -permissions: write-all - concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true @@ -25,6 +23,8 @@ jobs: test: name: Test timeout-minutes: 30 + permissions: + issues: write runs-on: ubuntu-latest steps: - name: Checkout From 80b06d44bf0741f0066ddc76a3d97c3cef32297f Mon Sep 17 00:00:00 2001 From: Leo Farias Date: Wed, 28 Feb 2024 17:01:32 -0500 Subject: [PATCH 7/8] Github action change --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e2a7da43..e11f85e5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,14 +9,12 @@ on: required: false default: "3.1.3" - pull_request: + pull_request_target: paths-ignore: - "docs/**" - "README.md" - "CHANGELOG.md" -permissions: write-all - concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true @@ -25,6 +23,8 @@ jobs: test: name: Test timeout-minutes: 30 + permissions: + issues: write runs-on: ubuntu-latest steps: - name: Checkout From da62390d339e6c3d3370d71fa63c7c7855415e3b Mon Sep 17 00:00:00 2001 From: Leo Farias Date: Wed, 28 Feb 2024 17:14:27 -0500 Subject: [PATCH 8/8] Update action --- .github/workflows/test.yml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e11f85e5..de12a59a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ on: required: false default: "3.1.3" - pull_request_target: + pull_request: paths-ignore: - "docs/**" - "README.md" @@ -23,8 +23,6 @@ jobs: test: name: Test timeout-minutes: 30 - permissions: - issues: write runs-on: ubuntu-latest steps: - name: Checkout @@ -44,17 +42,6 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} - - name: Run DCM - uses: CQLabs/dcm-action@v1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - ci_key: oss - email: oss - folders: . - fatal_style: true - fatal_performance: true - fatal_warnings: true - - name: Run DCM run: dcm analyze lib