Skip to content

Commit

Permalink
sumo: add patch version number to alias
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Schwamborn committed May 7, 2021
1 parent 0048500 commit a3191a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
File renamed without changes.
4 changes: 3 additions & 1 deletion update_formula.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ TAG=v${NEW_VERSION}
DATE_STRING=$(date +"%Y-%m-%d")
NEW_MAJOR=$(echo "${NEW_VERSION}" | awk -F . '{ print $1 }')
NEW_MINOR=$(echo "${NEW_VERSION}" | awk -F . '{ print $2 }')
NEW_PATCH=$(echo "${NEW_VERSION}" | awk -F . '{ print $3 }')

### ARCHIVE formula for old version
# make sure most current version of formula is installed
Expand All @@ -34,6 +35,7 @@ brew install sumo
OLD_VERSION=$(brew ls sumo --versions | awk '{print $2}')
OLD_MAJOR=$(echo "${OLD_VERSION}" | awk -F . '{ print $1 }')
OLD_MINOR=$(echo "${OLD_VERSION}" | awk -F . '{ print $2 }')
OLD_PATCH=$(echo "${OLD_VERSION}" | awk -F . '{ print $3 }')
echo "old sumo version: '$OLD_VERSION'"

# generate full string (including version number) for formula class name
Expand Down Expand Up @@ -65,7 +67,7 @@ git commit -m "sumo: update formula to v${NEW_VERSION}"

### UPDATE alias link
echo "updating Alias symlink..."
git mv Aliases/sumo\@${OLD_MAJOR}.${OLD_MINOR} Aliases/sumo\@${NEW_MAJOR}.${NEW_MINOR}
git mv Aliases/sumo\@${OLD_MAJOR}.${OLD_MINOR}.${OLD_PATCH} Aliases/sumo\@${NEW_MAJOR}.${NEW_MINOR}.${NEW_PATCH}
git commit -m "sumo: update alias"

### UPDATE version number in README.md
Expand Down

0 comments on commit a3191a4

Please sign in to comment.