pkg(common): Generate test file per version

This commit is contained in:
Thomas Hobson 2021-02-28 19:20:28 +13:00
parent 70262d8c4b
commit 1a7382bb6f
No known key found for this signature in database
GPG Key ID: 9F1FD9D87950DB6F
2 changed files with 6 additions and 3 deletions

3
packages/.gitignore vendored
View File

@ -1,2 +1,3 @@
build/
*.pkg.tar.gz
*.pkg.tar.gz
*.tf

View File

@ -34,11 +34,12 @@ name:
.NOTPARALLEL: build
build: ${BUILD_DIR} ${PKG_FILE}
build: ${BUILD_DIR} ${PKG_FILE} ${PKG_SLUG}.tf
clean:
rm -rf ${BUILD_DIR}
rm -f ${PKG_FILE}
rm -f ${PKG_SLUG}.tf
# mkdir
${BUILD_DIR}:
@ -61,7 +62,8 @@ $(patsubst %.json,%.jq,${INFO_FILE}):
echo '.build_platform="$(or ${PLATFORM}, baremetal-$(shell grep -oP "^ID=\K\w+" /etc/os-release ))"' >> $@
$(foreach dep, ${DEPENDENCIES}, echo '.dependencies.$(word 1,$(subst =, ,${dep}))="$(word 2,$(subst =, ,${dep}))"' >> $@)
${PKG_SLUG}.tf:
cp ${NAME}.test $@
# Helpers
%/: %.tar.gz