added makefile
This commit is contained in:
parent
d5ed4b9668
commit
ec4dbf0265
1 changed files with 38 additions and 0 deletions
38
Makefile
Normal file
38
Makefile
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
|
||||||
|
PKG_ID = com.monkeystew.goober_m
|
||||||
|
|
||||||
|
OUT_DIR = platforms/android/build/outputs/apk/release
|
||||||
|
UNALIGNED = $(OUT_DIR)/android-release-unsigned.apk
|
||||||
|
ALIGNED = $(OUT_DIR)/android-release-unsigned-aligned.apk
|
||||||
|
APK = $(OUT_DIR)/goober.apk
|
||||||
|
|
||||||
|
KEYSTORE = ~/android-keystore.jks
|
||||||
|
LOC_ADDR = $(shell hostname -i)
|
||||||
|
PUB_ADDR = $(shell hostname -I|awk '{print $$1}')
|
||||||
|
|
||||||
|
|
||||||
|
lab:
|
||||||
|
ionic serve -lc
|
||||||
|
|
||||||
|
device:
|
||||||
|
ionic cordova run android -lc --address $(PUB_ADDR) --device
|
||||||
|
|
||||||
|
emulator:
|
||||||
|
ionic cordova run android -lc --address $(LOC_ADDR) --emulator
|
||||||
|
|
||||||
|
$(UNALIGNED):
|
||||||
|
ionic cordova build android --release --prod
|
||||||
|
|
||||||
|
$(ALIGNED): $(UNALIGNED)
|
||||||
|
cd $(OUT_DIR)
|
||||||
|
$(ANDROID_HOME)/build-tools/*/zipalign -v -p 4 $< $@
|
||||||
|
|
||||||
|
$(APK): $(ALIGNED)
|
||||||
|
cd $(OUT_DIR)
|
||||||
|
$(ANDROID_HOME)/build-tools/*/apksigner sign --ks $(KEYSTORE) --out $@ $<
|
||||||
|
ls $@
|
||||||
|
|
||||||
|
release: $(APK)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm $(OUT_DIR)/*.apk
|
Reference in a new issue