2023-02-25 20:35:27 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
version=$(git describe --exact-match --tags HEAD || git rev-parse HEAD)
|
2024-03-22 20:50:40 +01:00
|
|
|
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}"
|