2
0
mirror of https://gitlab.com/Nanolx/NanoDroid synced 2024-10-31 09:20:23 +00:00

build-package: mark release report as snapshot if release-date -ne build-date

This commit is contained in:
Christopher Roy Bratusek 2019-08-11 22:46:13 +02:00
parent 69e5f2f1e4
commit 998cd673bb
3 changed files with 13 additions and 8 deletions

View File

@ -1,6 +1,8 @@
#!/bin/bash
version_code=22.3
version_date=20190811
build_date=$(LANG='en_US' date +"%Y%m%d")
VERSION=${version_code}.${build_date}

View File

@ -143,27 +143,28 @@ zip_add_setup () {
increase_version_number () {
if [ -z ${3} ]; then
ver=99999999
else ver=${3}
date=99999999
else date=${3}
fi
for file in "CommonAddon" "CommonInstaller" \
"systest/SysTest" "patcher/CommonPatcher" \
"SetupWizard/nanodroid-setup" \
"uninstaller/META-INF/com/google/android/update-binary"; do
sed -e "s/^VERSION=.*/VERSION=${2}.${ver}/" -i "${CWD}/${file}"
sed -e "s/^VERSION=.*/VERSION=${2}.${date}/" -i "${CWD}/${file}"
done
sed -e "s/^version_code.*/version_code=${2}" -i "${CWD}/build-package"
sed -e "s/^version_date.*/version_date=${date}" -i "${CWD}/build-package"
for module in Full microG FDroid BromiteWebView OsmAnd; do
sed -e "s/version=.*/version=v${2}.${ver}/" -i \
sed -e "s/version=.*/version=v${2}.${date}/" -i \
"${CWD}/${module}/module.prop"
done
sed -e "s/rom_version\",.*/rom_version\", \"${2}\")\;/" -i \
"${CWD}/SetupWizard/META-INF/com/google/android/aroma-config"
sed -e "s/rom_date\",.*/rom_date\", \"${ver}\")\;/" -i \
sed -e "s/rom_date\",.*/rom_date\", \"${date}\")\;/" -i \
"${CWD}/SetupWizard/META-INF/com/google/android/aroma-config"
exit 0

View File

@ -5,17 +5,19 @@ report_file="${CWD}/NanoDroid-Report-${VERSION}"
create_report_real () {
case ${VERSION} in
*99999999* ) ND_TYPE="Beta Release" ;;
* ) ND_TYPE="Stable Release" ;;
*99999999* ) build_type="Beta Release" ;;
* ) build_type="Stable Release" ;;
esac
[ "${build_date}" -ne "${version_date}" ] && build_type="Snapshot Release" ;;
rm -f "${report_file}"*
echo "
creating NanoDroid report:
| NanoDroid Version: ${VERSION}
| NanoDroid Type: ${ND_TYPE}
| NanoDroid Type: ${build_type}
| NanoDroid Report: $(basename ${report_file})
"