Move/adapt archive and release script to repo root

This commit is contained in:
Johannes Marbach 2024-03-22 20:50:40 +01:00
parent d9cb372c5c
commit 4f00ff228d
3 changed files with 17 additions and 3 deletions

21
archive.sh Executable file
View file

@ -0,0 +1,21 @@
#!/bin/bash
version=$(git describe --exact-match --tags HEAD || git rev-parse HEAD)
archive=buffybox-${version}.tar.gz
echo "Archiving repository with submodules..."
git-archive-all ${archive}
echo "Uploading archive to GitLab..."
response=$(curl --request POST \
--header "PRIVATE-TOKEN: $1" \
--form "file=@${archive}" \
"https://gitlab.com/api/v4/projects/52322952/uploads")
path=$(echo "${response}" | jq -r .full_path)
echo "${response}"
echo
echo "https://gitlab.com${path}"
rm -f "${archive}"