forked from MapComplete/MapComplete
Scripts(android): drop 'build_android_sfw', unneeded and didn't work anyway
This commit is contained in:
parent
cb2e912efb
commit
b433448eb1
1 changed files with 0 additions and 86 deletions
|
@ -82,89 +82,3 @@ jobs:
|
|||
git push origin --tags
|
||||
|
||||
|
||||
|
||||
build_android_safe:
|
||||
runs-on: hetzner-access
|
||||
|
||||
steps:
|
||||
- uses: https://source.mapcomplete.org/actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: true
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: https://source.mapcomplete.org/actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
cache: "npm"
|
||||
cache-dependency-path: package-lock.json
|
||||
|
||||
- name: clone submodule
|
||||
shell: bash
|
||||
run: |
|
||||
echo -e "[submodule \"android\"]\n\tpath = android\n\turl = https://source.mapcomplete.org/MapComplete/android-wrapper" > .gitmodules
|
||||
cat .gitmodules
|
||||
git submodule init
|
||||
git submodule update --init --recursive
|
||||
cd android
|
||||
git config --global --add safe.directory $(pwd)
|
||||
git remote -v
|
||||
git pull origin main
|
||||
|
||||
- name: install deps
|
||||
run: npm ci
|
||||
|
||||
- run: npm run init
|
||||
|
||||
- name: Run tests
|
||||
run: npm run test
|
||||
|
||||
- name: Build censored variant of the themes
|
||||
run: |
|
||||
npm run clean && npm run clean:deep
|
||||
npm run prep:layeroverview
|
||||
npm run generate:layeroverview -- --force --exclude-labels=nsfw
|
||||
npm run generate:layeroverview -- --force --exclude-labels=nsfw
|
||||
npm run generate:layeroverview -- --force --exclude-labels=nsfw --print-needed-assets
|
||||
|
||||
npm run generate:layouts
|
||||
|
||||
- name: Move dependency (@capacitor) into android repo
|
||||
run: |
|
||||
cd android
|
||||
cp -r ../node_modules/@capacitor ./
|
||||
sed "s/..\/node_modules\///g" -i capacitor.settings.gradle
|
||||
cat capacitor.settings.gradle
|
||||
git add capacitor.settings.gradle
|
||||
|
||||
- name: set android version number
|
||||
run: |
|
||||
cd android/app
|
||||
version_code=$(grep versionCode "build.gradle" | 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/" "build.gradle"
|
||||
sed -i "s/versionName \".*\"/versionName \"$versionname\"/" "build.gradle"
|
||||
cat build.gradle | grep "versionName"
|
||||
cat build.gradle | grep "versionCode"
|
||||
if grep -q 'versionName ""' build.gradle; then
|
||||
echo "Error: Empty versionName found in build.gradle"
|
||||
exit 1
|
||||
fi
|
||||
git add build.gradle
|
||||
|
||||
- name: prepare android build
|
||||
run: npm run android:prepare
|
||||
|
||||
- name: Update android repo
|
||||
run: |
|
||||
cd android
|
||||
git remote set-url origin "https://Bot:${{ secrets.BOT_PASSWORD }}@source.mapcomplete.org/MapComplete/android-wrapper"
|
||||
git config user.name "Bot"
|
||||
git config user.email "info@mapcomplete.org"
|
||||
git add -f app/src/main/assets/public/*
|
||||
git add capacitor.settings.gradle
|
||||
git commit -am "Add files for release ${{ github.ref_name }}"
|
||||
git tag "${{ github.ref_name }}-sfw"
|
||||
git push origin refs/heads/main --verbose
|
||||
git push origin --tags
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue