Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove yq dependency to fetch version from file #306

Open
danielgomezrico opened this issue May 3, 2024 · 3 comments
Open

Remove yq dependency to fetch version from file #306

danielgomezrico opened this issue May 3, 2024 · 3 comments

Comments

@danielgomezrico
Copy link

danielgomezrico commented May 3, 2024

Hi

Theres a bash way to parse the file and is using grep and awk like:
I use that on my scripts like:

      - name: Prepare flutter version from pubspec.yml
        run: |
          $content = Get-Content -Path pubspec.yaml
          $match = [regex]::match($content, 'flutter: (\d+\.\d+\.\d+)')
          echo "FLUTTER_VERSION=$($match.Groups[1].Value)" | Out-File -FilePath $env:GITHUB_ENV -Append
        shell: pwsh

      - uses: subosito/flutter-action@v2
        with:
          flutter-version: ${{env.FLUTTER_VERSION}}
          cache: false

Maybe the way that flutter-version-file works could change to this to avoid the YQ dependency install on windows, WDYT? can you guide me on how to change that? I could create the PR with that change 🤓

@yurikoles
Copy link

yurikoles commented May 4, 2024

  1. Clone the repository.
  2. Read the source code.
  3. Change it.
  4. Test it.
    ...
  5. Fix is released.
  6. PROFIT!

@alleey
Copy link

alleey commented May 10, 2024

Why is there a downvote on this? It a legit request. Its a great plugin but fails on Windows due to the yq dependency.

This is my usage example https://github.com/alleey/flutter-guesstheword/actions/runs/9027817973/workflow

and reading version from pubspec works except for Windows. I had to figure it out the hard way after so many failed attempts. The solution, for now, is to hard code version for the Windows platform.

It would be really great if Windows' builds could read version from pubspec.

@kuhnroyal
Copy link
Contributor

See actions/runner-images#7443 - hopefully this will be reconsidered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants