forked from MapComplete/MapComplete
Scripts: automatically bump version number and version name
This commit is contained in:
parent
339dcc5c09
commit
b75bfe2cab
1 changed files with 12 additions and 1 deletions
|
@ -50,7 +50,18 @@ jobs:
|
|||
cd android
|
||||
cp -r ../node_modules/@capacitor ./
|
||||
sed "s/..\/node_modules\///g" -i capacitor.settings.gradle
|
||||
|
||||
|
||||
- name: set android version number
|
||||
run: |
|
||||
cd android/app
|
||||
file="build.gradle"
|
||||
version_code=$(grep versionCode "$file" | grep -o '[0-9]\+')
|
||||
new_version_code=$((version_code + 1))
|
||||
versionname="${{ github.ref_name }}"
|
||||
versionname="${versionname:1}"
|
||||
sed -i "s/versionCode $version_code/versionCode $new_version_code/" "$file"
|
||||
sed -i "s/versionName \".*\"/versionName \"$new_versionname\"/" "$file"
|
||||
|
||||
|
||||
- name: Update android repo
|
||||
run: |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue