Files
buffybox/archive.sh
Vladimir Stoiakin fa985ec163 misc: update README
2025-04-16 13:19:01 +03:00

22 lines
539 B
Bash
Executable File

#!/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.postmarketos.org/api/v4/projects/172/uploads")
path=$(echo "${response}" | jq -r .full_path)
echo "${response}"
echo
echo "https://gitlab.postmarketos.org${path}"
rm -f "${archive}"