summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Ružička <jakub.ruzicka@nic.cz>2023-05-23 13:42:28 +0200
committerJakub Ružička <jakub.ruzicka@nic.cz>2023-06-22 16:06:26 +0200
commit333b8f404b8e9716513558a0787d7b50d26afde0 (patch)
treeb270ce76f1eeee58ddd652f8c9732c276db3ce66
parentupgrade-4-to-5: remove the rest of occurrences (diff)
downloadknot-resolver-333b8f404b8e9716513558a0787d7b50d26afde0.tar.xz
knot-resolver-333b8f404b8e9716513558a0787d7b50d26afde0.zip
scripts: improve make-archive.sh script
Copy resulting tarball into pkg/archives/dev and delete build_dist/ dir to keep working copy clean.
-rwxr-xr-xscripts/make-archive.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/make-archive.sh b/scripts/make-archive.sh
index 82703674..b9d00aa4 100755
--- a/scripts/make-archive.sh
+++ b/scripts/make-archive.sh
@@ -33,6 +33,14 @@ rm -rf build_dist ||:
meson build_dist
ninja -C build_dist dist
-# print path to generated tarball
-set +o xtrace
-find "${PWD}/build_dist/meson-dist/" -name "knot-resolver-*.tar.xz"
+# copy tarball to apkg path
+DIST_ARCHIVE=$(find "build_dist/meson-dist/" -name "knot-resolver-*.tar.xz")
+APKG_ARCHIVE="pkg/archives/dev/$(basename $DIST_ARCHIVE)"
+mkdir -p pkg/archives/dev
+cp "$DIST_ARCHIVE" "$APKG_ARCHIVE"
+
+# remove build directory
+rm -rf build_dist ||:
+
+# print path to generated tarball as expected by apkg
+echo "$APKG_ARCHIVE"