[develop]: Update release.sh
This commit is contained in:
parent
b00ab858c2
commit
6297e9b125
28
release.sh
28
release.sh
|
@ -1,4 +1,6 @@
|
||||||
rm -f v*.zip
|
rm -f *.zip
|
||||||
|
|
||||||
|
# Portal
|
||||||
git clone https://code-repo.d4science.org/MaDgIK/irish-monitor.git
|
git clone https://code-repo.d4science.org/MaDgIK/irish-monitor.git
|
||||||
cd irish-monitor
|
cd irish-monitor
|
||||||
git checkout master
|
git checkout master
|
||||||
|
@ -11,7 +13,27 @@ cd ../openaire-theme
|
||||||
git checkout master
|
git checkout master
|
||||||
cd ../../../
|
cd ../../../
|
||||||
npm run after-build-clean
|
npm run after-build-clean
|
||||||
cd ../
|
|
||||||
version=$(npm pkg get version | xargs)
|
version=$(npm pkg get version | xargs)
|
||||||
zip -r v$version.zip irish-monitor
|
cd ../
|
||||||
|
zip -r irish-monitor-$version.zip irish-monitor
|
||||||
rm -rf irish-monitor
|
rm -rf irish-monitor
|
||||||
|
|
||||||
|
# Service
|
||||||
|
git clone https://code-repo.d4science.org/MaDgIK/irish-monitor-service.git
|
||||||
|
cd irish-monitor-service
|
||||||
|
git checkout production
|
||||||
|
rm -rf .git*
|
||||||
|
version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
|
||||||
|
# Remove the '-SNAPSHOT' suffix
|
||||||
|
version=${version%-SNAPSHOT}
|
||||||
|
# Split the version string into major, minor, and patch components
|
||||||
|
IFS='.' read -r major minor patch <<EOF
|
||||||
|
$version
|
||||||
|
EOF
|
||||||
|
# Subtract one from the patch version
|
||||||
|
patch=$((patch - 1))
|
||||||
|
# Reconstruct the version string
|
||||||
|
version="$major.$minor.$patch"
|
||||||
|
cd ../
|
||||||
|
zip -r irish-monitor-service-$version.zip irish-monitor-service
|
||||||
|
rm -rf irish-monitor-service
|
||||||
|
|
Loading…
Reference in New Issue