[build] Make a target stable_release which build every executable needed

for a stable release
This commit is contained in:
Émilie Feral
2020-02-17 14:01:51 +01:00
committed by Ecco
parent 558e2734f0
commit d6504a6c6a

View File

@@ -41,3 +41,58 @@ endef
-include build/targets.$(PLATFORM).mak
$(foreach extension,$(HANDY_TARGETS_EXTENSIONS),$(foreach executable,$(HANDY_TARGETS),$(eval $(call handy_target_rule,$(executable),$(extension)))))
define source_emsdk
source ~/emsdk/emsdk_env.sh > /dev/null
endef
ANDROID_GRADLE_KEYSTORE:= $(wildcard ~/.gradle/google-play-upload.keystore)
ANDROID_GRADLE_PROPERTIES:= $(wildcard ~/.gradle/gradle.properties)
IOS_MOBILE_PROVISION:= $(wildcard ~/Downloads/NumWorks_Graphing_Calculator_Distribution.mobileprovision)
MISSING_FILES=1
ifneq "$(and $(ANDROID_GRADLE_KEYSTORE),$(ANDROID_GRADLE_PROPERTIES))" ""
ifneq "$(IOS_MOBILE_PROVISION)" ""
MISSING_FILES=0
endif
endif
.PHONY: stable_release
ifeq ($(MISSING_FILES),1)
stable_release:
@echo "Some required files for app signing are missing among: ~/.gradle/google-play-upload.keystore, ~/.gradle/gradle.properties or ~/Downloads/NumWorks_Graphing_Calculator_Distribution.mobileprovision."
else
stable_release:
$(Q) rm -rf output/stable_release
$(Q) mkdir -p output/stable_release
$(Q) echo "BUILD_FIRMWARE DEVICE N0110"
$(Q) make clean
$(Q) make -j8 epsilon.official.onboarding.dfu
$(Q) cp output/release/device/n0110/epsilon.official.onboarding.dfu output/stable_release/epsilon.device.n0110.dfu
$(Q) echo "BUILD_FIRMWARE DEVICE N0100"
$(Q) make MODEL=n0100 clean
$(Q) make -j8 MODEL=n0100 epsilon.official.onboarding.dfu
$(Q) cp output/release/device/n0100/epsilon.official.onboarding.dfu output/stable_release/epsilon.device.n0100.dfu
$(Q) echo "BUILD_FIRMWARE SIMULATOR WEB ZIP"
$(Q) make -j8 DEBUG=0 PLATFORM=simulator TARGET=web clean
$(Q) $(call source_emsdk); make -j8 DEBUG=0 PLATFORM=simulator TARGET=web output/release/simulator/web/simulator.official.zip
$(Q) cp output/release/simulator/web/simulator.official.zip output/stable_release/simulator.web.zip
$(Q) echo "BUILD_FIRMWARE SIMULATOR WEB JS"
$(Q) $(call source_emsdk); make -j8 DEBUG=0 PLATFORM=simulator TARGET=web epsilon.official.js
$(Q) cp output/release/simulator/web/epsilon.official.js output/stable_release/epsilon.js
$(Q) echo "BUILD_FIRMWARE SIMULATOR WEB PYTHON JS"
$(Q) make -j8 DEBUG=0 PLATFORM=simulator TARGET=web clean
$(Q) $(call source_emsdk); make -j8 DEBUG=0 PLATFORM=simulator TARGET=web EPSILON_GETOPT=1 EPSILON_APPS=code epsilon.official.js
$(Q) cp output/release/simulator/web/epsilon.official.js output/stable_release/epsilon.python.js
$(Q) echo "BUILD_FIRMWARE SIMULATOR ANDROID"
$(Q) make -j8 PLATFORM=simulator TARGET=android clean
$(Q) make -j8 PLATFORM=simulator TARGET=android epsilon.official.apk
#TODO: what are the files made by gradle?
# $(Q) cp output/release/simulator/android/epsilon.official.apk output/stable_release/epsilon.apk
$(Q) echo "BUILD_FIRMWARE SIMULATOR IOS"
$(Q) make -j8 PLATFORM=simulator TARGET=ios clean
$(Q) make -j8 PLATFORM=simulator TARGET=ios IOS_PROVISIONNING_PROFILE="~/Downloads/NumWorks_Graphing_Calculator_Distribution.mobileprovision" output/release/simulator/ios/app/epsilon.official.ipa
#TODO: which files are generated by codesign?
# $(Q) cp output/release/simulator/ios/app/epsilon.official.ipa output/stable_release/epsilon.ipa
endif