Skip to content
Snippets Groups Projects
Commit 9151f6ff authored by Benoît Harrault's avatar Benoît Harrault
Browse files

Merge branch '81-fix-build-process' into 'master'

Resolve "Fix build process"

Closes #81

See merge request !78
parents 1da3b992 4827ad1b
No related branches found
No related tags found
1 merge request!78Resolve "Fix build process"
Pipeline #6178 passed
......@@ -33,10 +33,11 @@ android:build-debug:
- flutter build apk --debug
# prepare artifact
- BASE_APK_FOLDER="build/app/outputs/flutter-apk"
- APP_NAME="$(grep 'namespace' android/app/build.gradle | cut -d'"' -f2)"
- >
if [ "$(find "${BASE_APK_FOLDER}" -name "*.apk")" != "" ]; then
for APK in ${BASE_APK_FOLDER}/*.apk; do
mv -v "${APK}" "$(echo "${APK}" | sed "s|\.apk|_${VERSION_CODE}.apk|")"
mv -v "${APK}" "$(echo "${APK}" | sed "s|\.apk|_${VERSION_CODE}.apk|" | sed "s|/app-|/${APP_NAME}-|")"
done
fi
- find "${BASE_APK_FOLDER}" -name "*.apk" # where are my apk?
......@@ -69,6 +70,7 @@ android:build-release:
- mkdir -p "${BASE_APK_FOLDER}"
- VERSION_NAME="$(grep '^version:' pubspec.yaml | cut -d' ' -f2 | cut -d'+' -f1)"
- VERSION_CODE="$(grep '^version:' pubspec.yaml | cut -d' ' -f2 | cut -d'+' -f2)"
- APP_NAME="$(grep 'namespace' android/app/build.gradle | cut -d'"' -f2)"
- TAG_NAME="Release_${VERSION_NAME}_${VERSION_CODE}"
- echo "${TAG_NAME}"
- >
......@@ -84,7 +86,7 @@ android:build-release:
- >
if [ "$(find "${BASE_APK_FOLDER}" -name "*.apk")" != "" ]; then
for APK in ${BASE_APK_FOLDER}/*.apk; do
mv -v "${APK}" "$(echo "${APK}" | sed "s|\.apk|_${VERSION_CODE}.apk|")"
mv -v "${APK}" "$(echo "${APK}" | sed "s|\.apk|_${VERSION_CODE}.apk|" | sed "s|/app-|/${APP_NAME}-|")"
done
fi
- find "${BASE_APK_FOLDER}" -name "*.apk" # where are my apk?
......
......@@ -3,7 +3,7 @@ description: A random application, for testing purpose only.
publish_to: "none"
version: 1.0.60+61
version: 1.0.61+62
environment:
sdk: "^3.0.0"
......
test.sh 0 → 100755
#!/bin/bash -i
BASE_APK_FOLDER="build/app/outputs/flutter-apk"
VERSION_NAME="$(grep '^version:' pubspec.yaml | cut -d' ' -f2 | cut -d'+' -f1)"
VERSION_CODE="$(grep '^version:' pubspec.yaml | cut -d' ' -f2 | cut -d'+' -f2)"
APP_NAME="$(grep 'namespace' android/app/build.gradle | cut -d'"' -f2)"
if [ "$(find "${BASE_APK_FOLDER}" -name "*.apk")" != "" ]; then
for APK in ${BASE_APK_FOLDER}/*.apk; do
mv -v "${APK}" "$(echo "${APK}" | sed "s|\.apk|_${VERSION_CODE}.apk|" | sed "s|/app-|/${APP_NAME}-|")"
done
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment