buffybox/archive.sh

22 lines
539 B
Bash
Raw Permalink Normal View History

2023-02-25 20:35:27 +01:00
#!/bin/bash
version=$(git describe --exact-match --tags HEAD || git rev-parse HEAD)
archive=buffybox-${version}.tar.gz
2023-02-25 20:35:27 +01:00
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}" \
2025-04-16 13:19:01 +03:00
"https://gitlab.postmarketos.org/api/v4/projects/172/uploads")
2023-02-25 20:35:27 +01:00
path=$(echo "${response}" | jq -r .full_path)
echo "${response}"
echo
2025-04-16 13:19:01 +03:00
echo "https://gitlab.postmarketos.org${path}"
2023-02-25 20:35:27 +01:00
rm -f "${archive}"