summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rwxr-xr-xscripts/make-version-file6
2 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 38448f39..0a0cb2dd 100644
--- a/Makefile
+++ b/Makefile
@@ -23,11 +23,12 @@ prepare:
.PHONY: iso
.ONESHELL:
-iso: prepare
+iso: clean prepare
@set -e
@echo "It's not like I'm building this specially for you or anything!"
cd $(build_dir)
lb build 2>&1 | tee build.log
+ ln -nsf live-image-amd64.hybrid.iso vyos-`cat version`-`dpkg --print-architecture`.iso
.PHONY: prepare-package-env
.ONESHELL:
@@ -45,6 +46,7 @@ clean:
rm -f config/binary config/bootstrap config/chroot config/common config/source
rm -f build.log
+ rm -f vyos-*.iso
.PHONY: purge
purge:
diff --git a/scripts/make-version-file b/scripts/make-version-file
index fcc399f8..6c597090 100755
--- a/scripts/make-version-file
+++ b/scripts/make-version-file
@@ -64,3 +64,9 @@ with open(os.path.join(defaults.CHROOT_INCLUDES_DIR, 'opt/vyatta/etc/version.jso
# for upgrade
with open(os.path.join(defaults.CHROOT_INCLUDES_DIR, 'opt/vyatta/etc/version'), 'w') as f:
print("Version: {0}".format(version), file=f)
+
+# Leaky abstraction: we want ISO file name include version number,
+# but we probably don't want to have a separate build step just for this,
+# neither we want to use lengthy paths in makefiles
+with open(os.path.join(defaults.BUILD_DIR, 'version'), 'w') as f:
+ print(version, file=f)