mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-24 10:25:51 +03:00
increment_version.sh: Add preview mode
Change-Id: Icc7169e4abdc289ed60884b3ed6aec74c37d19d1
This commit is contained in:
parent
d245af4d9c
commit
4a483986f0
1 changed files with 19 additions and 1 deletions
|
@ -6,7 +6,14 @@ mydir="$(dirname "$(realpath "$0")")"
|
||||||
|
|
||||||
source "$mydir/merge_helpers.sh"
|
source "$mydir/merge_helpers.sh"
|
||||||
|
|
||||||
require_clean_git
|
if [ "$1" = "preview" ]; then
|
||||||
|
preview=1
|
||||||
|
shift
|
||||||
|
else
|
||||||
|
preview=0
|
||||||
|
require_clean_git
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ "$1" = "test" ]; then
|
if [ "$1" = "test" ]; then
|
||||||
release_type="test"
|
release_type="test"
|
||||||
|
@ -70,8 +77,19 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
version="$versionMajor.$versionMinor.$versionPatch.sc.$scVersion"
|
version="$versionMajor.$versionMinor.$versionPatch.sc.$scVersion"
|
||||||
|
|
||||||
|
if [ "$release_type" = "test" ]; then
|
||||||
|
version="$version-test"
|
||||||
|
fi
|
||||||
|
|
||||||
new_tag="sc_v$version"
|
new_tag="sc_v$version"
|
||||||
|
|
||||||
|
if ((preview)); then
|
||||||
|
echo "versionCode $versionCode"
|
||||||
|
echo "versionName $version"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
set_prop "ext.scVersion" "$scVersion"
|
set_prop "ext.scVersion" "$scVersion"
|
||||||
set_prop "versionCode" "$versionCode"
|
set_prop "versionCode" "$versionCode"
|
||||||
set_prop "versionName" "\"$version\""
|
set_prop "versionName" "\"$version\""
|
||||||
|
|
Loading…
Reference in a new issue