changeset 493:0a17c6e7cb0f stable-1.9.4-3

improve Makefile
author Carl Byington <carl@five-ten-sg.com>
date Tue, 15 Feb 2022 14:07:00 -0800
parents e88d48be89a8
children 3484e9b9b734
files Makefile
diffstat 1 files changed, 8 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Tue Feb 15 13:45:57 2022 -0800
+++ b/Makefile	Tue Feb 15 14:07:00 2022 -0800
@@ -5,7 +5,6 @@
 style:=release
 dest:=../ASM/Installers
 ver:=$(shell grep versionName app/src/main/AndroidManifest.xml | cut -d'"' -f2)
-apk:='app/build/outputs/apk/510Connectbot-$(ver).$(style).apk'
 id:=$(shell hg id --id || echo 1)
 da:=$(shell date '+%Y-%m-%dT%H:%M:%S')
 version:=\
@@ -13,6 +12,8 @@
 <resources>\n\
 	<string name=\"msg_version\" translatable=\"false\">510Connectbot $(ver) ($(id) $(da))</string>\n\
 </resources>\n
+apk:=$(dest)/510Connectbot-$(ver).$(style).apk
+signapk:=$(shell cat ~/.signapk)
 
 ifeq ($(style),release)
     task:=assembleArmRelease
@@ -20,19 +21,19 @@
 else
 	task:=assembleArmDebug
 	debug:=1
+	signapk:=
 endif
 
 fn:=app/src/main/java/com/five_ten_sg/connectbot/monitor/MonitorService.java
 
 all:
-	hg pull; hg update
-	make builder
+	make build.asm.packages
 
 builder: clean prep
-	ANDROID_HOME=/home/carl/Android/Sdk ANDROID_NDK_HOME=/home/carl/Android/Sdk/ndk-bundle ./gradlew $(task)
+	#ANDROID_HOME=/home/carl/Android/Sdk ANDROID_NDK_HOME=/home/carl/Android/Sdk/ndk-bundle ./gradlew $(task)
+	echo ./gradlew $(task)
+	@echo -e "$(signapk)\n$(signapk)" | ./gradlew $(task)
 	mv app/build/outputs/apk/arm/$(style)/app-arm-$(style).apk $(apk)
-	cp $(apk) $(dest)
-	ls -al $(dest)
 
 clean:
 	rm -rf app/build/*
@@ -121,16 +122,12 @@
 
 
 build.asm.packages:
+	make prep
 	make builder style=release
-	hg revert --no-backup app/src/main/res/values/version.xml
-	#
 	make builder style=debug
-	hg revert --no-backup app/src/main/res/values/version.xml
 
 #
 # release procedure
 # make any changes
-#
-# make prep
 # hg commit -m 'commit message'
 # make build.asm.packages