Skip to content

Commit

Permalink
fix: dynamic update version value strucutre change in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunprakash027 committed Jan 27, 2024
1 parent b90a167 commit c427c61
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/update_version_airlift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,22 @@ jobs:
url=${{ steps.get_release.outputs.url }}
sha256=$(curl -sSL $url | shasum -a 256 | awk '{print $1}')
rm Casks/airlift.rb
echo "Updating formula file with version $tag and sha256 $sha256"
sed -i -E "s/version \"[^\"]+\"/version \"$tag\"/" Casks/airlift.rb
sed -i -E "s/airlift_version = \"[^\"]+\"/airlift_version = \"$tag\"/" Casks/airlift.rb
sed -i -E "s/sha256 \"[^\"]+\"/sha256 \"$sha256\"/" Casks/airlift.rb
echo 'cask "airlift" do' > Casks/airlift.rb
echo " version \"$tag\"" >> Casks/airlift.rb
echo " sha256 \"$sha256\"" >> Casks/airlift.rb
echo " airlift_version = \"$tag\"" >> Casks/airlift.rb
echo " url \"https://github.com/TheAcharya/Airlift/releases/download/v$tag/Airlift_$tag.pkg\"" >> Casks/airlift.rb
echo ' name "Airlift"' >> Casks/airlift.rb
echo ' desc "Upload & Merge Data with Attachments to Airtable"' >> Casks/airlift.rb
echo ' homepage "https://github.com/TheAcharya/Airlift"' >> Casks/airlift.rb
echo '' >> Casks/airlift.rb
echo ' pkg "Airlift_$tag.pkg"' >> Casks/airlift.rb
echo '' >> Casks/airlift.rb
echo ' uninstall pkgutil: "co.theacharya.Airlift"' >> Casks/airlift.rb
echo 'end' >> Casks/airlift.rb
# Commit changes
- name: Commit changes
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/update_version_markers-extractor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,21 @@ jobs:
url=${{ steps.get_release.outputs.url }}
sha256=$(curl -sSL $url | shasum -a 256 | awk '{print $1}')
rm Casks/markers-extractor.rb
echo "Updating formula file with version $tag and sha256 $sha256"
sed -i -E "s/version \"[^\"]+\"/version \"$tag\"/" Casks/markers-extractor.rb
sed -i -E "s/markers_cli_ver = \"[^\"]+\"/markers_cli_ver = \"$tag\"/" Casks/markers-extractor.rb
sed -i -E "s/sha256 \"[^\"]+\"/sha256 \"$sha256\"/" Casks/markers-extractor.rb
echo 'cask "markers-extractor" do' > Casks/markers-extractor.rb
echo " version \"$tag\"" >> Casks/markers-extractor.rb
echo " sha256 \"$sha256\"" >> Casks/markers-extractor.rb
echo " markers_cli_ver = \"$tag\"" >> Casks/markers-extractor.rb
echo " url \"https://github.com/TheAcharya/MarkersExtractor/releases/download/#{tag}/markers-extractor-cli-#{tag}.pkg\"" >> Casks/markers-extractor.rb
echo ' name "MarkersExtractor"' >> Casks/markers-extractor.rb
echo ' desc "Extract Markers from Final Cut Pro FCPXML"' >> Casks/markers-extractor.rb
echo ' homepage "https://github.com/TheAcharya/MarkersExtractor"' >> Casks/markers-extractor.rb
echo '' >> Casks/markers-extractor.rb
echo " pkg \"markers-extractor-cli-#{tag}.pkg\"" >> Casks/markers-extractor.rb
echo '' >> Casks/markers-extractor.rb
echo ' uninstall pkgutil: "co.theacharya.MarkersExtractor"' >> Casks/markers-extractor.rb
echo 'end' >> Casks/markers-extractor.rb
# Commit changes
- name: Commit changes
Expand Down

0 comments on commit c427c61

Please sign in to comment.