mirror of
https://github.com/immich-app/immich.git
synced 2024-12-29 15:11:58 +00:00
fix(ci) pump script reset minor and patch based on major and minor pump (#1515)
This commit is contained in:
parent
ab2c019a7a
commit
dcb56ae775
1 changed files with 11 additions and 10 deletions
|
@ -16,10 +16,12 @@ MOBILE_PUMP="false"
|
||||||
|
|
||||||
while getopts 's:m:' flag; do
|
while getopts 's:m:' flag; do
|
||||||
case "${flag}" in
|
case "${flag}" in
|
||||||
s) SERVER_PUMP=${OPTARG} ;;
|
s) SERVER_PUMP=${OPTARG} ;;
|
||||||
m) MOBILE_PUMP=${OPTARG} ;;
|
m) MOBILE_PUMP=${OPTARG} ;;
|
||||||
*) echo "Invalid args"
|
*)
|
||||||
exit 1 ;;
|
echo "Invalid args"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -30,8 +32,11 @@ PATCH=$(echo $CURRENT_SERVER | cut -d '.' -f3)
|
||||||
|
|
||||||
if [[ $SERVER_PUMP == "major" ]]; then
|
if [[ $SERVER_PUMP == "major" ]]; then
|
||||||
MAJOR=$((MAJOR + 1))
|
MAJOR=$((MAJOR + 1))
|
||||||
|
MINOR=0
|
||||||
|
PATCH=0
|
||||||
elif [[ $SERVER_PUMP == "minor" ]]; then
|
elif [[ $SERVER_PUMP == "minor" ]]; then
|
||||||
MINOR=$((MINOR + 1))
|
MINOR=$((MINOR + 1))
|
||||||
|
PATCH=0
|
||||||
elif [[ $SERVER_PUMP == "patch" ]]; then
|
elif [[ $SERVER_PUMP == "patch" ]]; then
|
||||||
PATCH=$((PATCH + 1))
|
PATCH=$((PATCH + 1))
|
||||||
elif [[ $SERVER_PUMP == "false" ]]; then
|
elif [[ $SERVER_PUMP == "false" ]]; then
|
||||||
|
@ -54,8 +59,6 @@ else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if [ "$CURRENT_SERVER" != "$NEXT_SERVER" ]; then
|
if [ "$CURRENT_SERVER" != "$NEXT_SERVER" ]; then
|
||||||
|
|
||||||
echo "Pumping Server: $CURRENT_SERVER => $NEXT_SERVER"
|
echo "Pumping Server: $CURRENT_SERVER => $NEXT_SERVER"
|
||||||
|
@ -66,8 +69,6 @@ if [ "$CURRENT_SERVER" != "$NEXT_SERVER" ]; then
|
||||||
sed -i "s/version_number: \"$CURRENT_SERVER\"$/version_number: \"$NEXT_SERVER\"/" mobile/ios/fastlane/Fastfile
|
sed -i "s/version_number: \"$CURRENT_SERVER\"$/version_number: \"$NEXT_SERVER\"/" mobile/ios/fastlane/Fastfile
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if [ "$CURRENT_MOBILE" != "$NEXT_MOBILE" ]; then
|
if [ "$CURRENT_MOBILE" != "$NEXT_MOBILE" ]; then
|
||||||
|
|
||||||
echo "Pumping Mobile: $CURRENT_MOBILE => $NEXT_MOBILE"
|
echo "Pumping Mobile: $CURRENT_MOBILE => $NEXT_MOBILE"
|
||||||
|
@ -76,4 +77,4 @@ if [ "$CURRENT_MOBILE" != "$NEXT_MOBILE" ]; then
|
||||||
sed -i "s/^version: $CURRENT_SERVER+$CURRENT_MOBILE$/version: $NEXT_SERVER+$NEXT_MOBILE/" mobile/pubspec.yaml
|
sed -i "s/^version: $CURRENT_SERVER+$CURRENT_MOBILE$/version: $NEXT_SERVER+$NEXT_MOBILE/" mobile/pubspec.yaml
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "IMMICH_VERSION=v$NEXT_SERVER" >> $GITHUB_ENV
|
echo "IMMICH_VERSION=v$NEXT_SERVER" >>$GITHUB_ENV
|
||||||
|
|
Loading…
Reference in a new issue