From 32c53500bbdc9d3a6598c602921c9b293aeac03b Mon Sep 17 00:00:00 2001 From: Joe AE6XE Date: Thu, 9 Aug 2018 21:54:16 +0000 Subject: [PATCH] build: save and name images released --- Makefile | 12 ++++-------- scripts/tests/postbuild/700-imagename.sh | 4 ++-- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 374062a1..91c74d79 100644 --- a/Makefile +++ b/Makefile @@ -14,13 +14,7 @@ OPENWRT_DIR=$(TOP_DIR)/openwrt TARGET_CONFIG=$(TOP_DIR)/configs/common.config $(TOP_DIR)/configs/$(MAINTARGET)-$(SUBTARGET).config UMASK=umask 022 -# set variables based on private or travis-ci build -ifeq ($(TRAVIS),true) -$(info Travis-CI build ...) -FW_VERSION=$(TRAVIS_BUILD_NUMBER)-$(TRAVIS_COMMIT) -else -FW_VERSION=$(PRIVATE_BUILD_VERSION)-$(GIT_COMMIT) -endif +FW_VERSION=$(PRIVATE_BUILD_VERSION) # test for existing $TARGET-config or abort ifeq ($(wildcard $(TOP_DIR)/configs/$(TARGET).config),) @@ -130,11 +124,13 @@ compile: stamp-clean-compiled .stamp-compiled rm -f $(TOP_DIR)/firmware/AREDN* for FILE in $(TOP_DIR)/firmware/openwrt*; do \ [ -e "$$FILE" ] || continue; \ - NEWNAME="$${FILE/openwrt-/AREDN-}"; \ + NEWNAME="$${FILE/openwrt-/AREDN-$(FW_VERSION)-}"; \ NEWNAME="$${NEWNAME/ar71xx-generic-/}"; \ NEWNAME="$${NEWNAME/squashfs-/}"; \ mv "$$FILE" "$$NEWNAME"; \ done; + rm -f $(TOP_DIR)/firmware/AREDN-$(FW_VERSION)-[!cu]*; + rm -f $(TOP_DIR)/firmware/AREDN-$(FW_VERSION)-{ca,ubd,ubnt-air-,ubnt-ls-,ubnt-u,uI,ubnt-rs,ubnt-loco-x}*; $(TOP_DIR)/scripts/tests-postbuild.sh $(TOP_DIR)/firmware: diff --git a/scripts/tests/postbuild/700-imagename.sh b/scripts/tests/postbuild/700-imagename.sh index 569720bc..62592b8c 100755 --- a/scripts/tests/postbuild/700-imagename.sh +++ b/scripts/tests/postbuild/700-imagename.sh @@ -38,10 +38,10 @@ LICENSE ## Values for count of final images ### This value should be updated as we add/remove device image types -NUMBEROFIMAGESCOUNT=60 +NUMBEROFIMAGESCOUNT=7 ### Static Files, only when buildroot changes adjust output files types. ### These are files such as vmlinux, uimage, etc. -STATICFILESCOUNT=141 +STATICFILESCOUNT=0 # END Variables that may need adjusting