Skip to content

Commit

Permalink
Use ruby interpolation in zip_uri too
Browse files Browse the repository at this point in the history
Motivation: make git diff for homebrew-tap repo easier to review
  • Loading branch information
nikitabobko committed Nov 29, 2024
1 parent 84c30b9 commit 6148112
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions script/build-brew-cask.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,12 @@ else
fi
sha=$(shasum -a 256 "$zip_file" | awk '{print $1}')


cask_version=''
zip_root_dir=''
if grep -q SNAPSHOT <<< "$build_version"; then
# Prevent 'Not upgrading aerospace, the latest version is already installed'
cask_version=':latest'
zip_root_dir="AeroSpace-v$build_version"
else
cask_version=':latest' # Prevent 'Not upgrading aerospace, the latest version is already installed'
zip_root_dir="AeroSpace-v$build_version"
if ! grep -q SNAPSHOT <<< "$build_version"; then
cask_version="'$build_version'"
zip_root_dir='AeroSpace-v#{version}'
zip_root_dir=$(sed "s/$build_version/#{version}/g" <<< "$zip_root_dir")
zip_uri=$(sed "s/$build_version/#{version}/g" <<< "$zip_uri")
fi

manpages=$(unzip -l "$zip_file" | \
Expand Down

0 comments on commit 6148112

Please sign in to comment.