2024-01-09 12:00:00 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -exu
|
|
|
|
|
2024-02-07 12:00:00 +01:00
|
|
|
git push --tags
|
|
|
|
|
2024-01-09 12:00:00 +01:00
|
|
|
docker run -it --rm -e HOME=/tmp/ -v "$(pwd)":/tmp/code -w /tmp/code -u "$(id -u)" golang:1.20 make reaction.deb
|
|
|
|
|
|
|
|
make signatures
|
|
|
|
|
|
|
|
TAG="$(git tag --sort=v:refname | tail -n1)"
|
|
|
|
|
2024-02-07 12:00:00 +01:00
|
|
|
rsync -avz -e 'ssh -J pica01' ./ip46tables ./nft46 ./reaction ./reaction.deb ./nft46.minisig ./ip46tables.minisig ./reaction.minisig ./reaction.deb.minisig akesi:/var/www/static/reaction/releases/"$TAG"
|
2024-01-09 12:00:00 +01:00
|
|
|
|
|
|
|
TOKEN="$(rbw get framagit.org token)"
|
|
|
|
|
|
|
|
DATA='{
|
|
|
|
"tag_name":"'"$TAG"'",
|
|
|
|
"assets":{"links":[
|
2024-02-07 12:00:00 +01:00
|
|
|
{"url": "https://static.ppom.me/reaction/releases/'"$TAG"'/nft46", "name": "nft46 (x86-64)", "link_type": "package"},
|
2024-01-09 12:00:00 +01:00
|
|
|
{"url": "https://static.ppom.me/reaction/releases/'"$TAG"'/reaction", "name": "reaction (x86-64)", "link_type": "package"},
|
|
|
|
{"url": "https://static.ppom.me/reaction/releases/'"$TAG"'/ip46tables", "name": "ip46tables (x86-64)", "link_type": "package"},
|
|
|
|
{"url": "https://static.ppom.me/reaction/releases/'"$TAG"'/reaction.deb", "name": "reaction.deb (x86-64)", "link_type": "package"},
|
2024-02-07 12:00:00 +01:00
|
|
|
{"url": "https://static.ppom.me/reaction/releases/'"$TAG"'/nft46.minisig", "name": "nft46.minisig", "link_type": "other"},
|
2024-01-09 12:00:00 +01:00
|
|
|
{"url": "https://static.ppom.me/reaction/releases/'"$TAG"'/reaction.minisig", "name": "reaction.minisig", "link_type": "other"},
|
|
|
|
{"url": "https://static.ppom.me/reaction/releases/'"$TAG"'/ip46tables.minisig", "name": "ip46tables.minisig", "link_type": "other"},
|
|
|
|
{"url": "https://static.ppom.me/reaction/releases/'"$TAG"'/reaction.deb.minisig", "name": "reaction.deb.minisig", "link_type": "other"}
|
|
|
|
]}}'
|
|
|
|
|
|
|
|
curl \
|
|
|
|
--fail-with-body \
|
|
|
|
--location \
|
|
|
|
-X POST \
|
|
|
|
-H 'Content-Type: application/json' \
|
|
|
|
-H "PRIVATE-TOKEN: $TOKEN" \
|
|
|
|
'https://framagit.org/api/v4/projects/90566/releases' \
|
|
|
|
--data "$DATA"
|
|
|
|
|
|
|
|
make clean
|