Skip to content

Commit

Permalink
fix: release-it support macos
Browse files Browse the repository at this point in the history
  • Loading branch information
mosoriob committed Mar 22, 2022
1 parent 7bd026e commit 110a949
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .update-version.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
#!/bin/bash
set -e
version=${1}
sed -i "s/You are running WINGS version: .*/You are running WINGS version: ${version} /g" portal/src/main/webapp/html/home.html

if [[ "$OSTYPE" == "linux-gnu"* ]]; then
sed -i "s/You are running WINGS version: .*/You are running WINGS version: ${version} /g" portal/src/main/webapp/html/home.html
elif [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OSX
if ! command -v gsed &> /dev/null
then
echo "Please install gsed on macos"
exit 1
fi
gsed -i "s/You are running WINGS version: .*/You are running WINGS version: ${version} /g" portal/src/main/webapp/html/home.html
else
echo "OS not supported"
exit 1
fi
cd core
mvn --settings pom.xml org.codehaus.mojo:versions-maven-plugin:2.1:set -DnewVersion=${version}
exit 0
exit 0

0 comments on commit 110a949

Please sign in to comment.