summaryrefslogtreecommitdiffstats
path: root/push-to-codeberg
blob: 54b06f57b6dcdab045ccba9086d0077985c524fe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/zsh
# A manually written script for pushing select packages to codeberg.
# You likely have no use for this. Ignore it.

source ~/.config/codeberg-push-env
ARCH="${CBUILD:-"${CARCH:-"x86_64"}"}"
if [[ "$ARCH" != "x86_64" ]]; then echo "Non-x86_64 architectures are currently poorly handled by Codeberg."; exit 1; fi
pushToRepo() {
  curl -fLo- --user "$API_USER:$API_KEY" --upload-file target/"$1"/"${ARCH}"/"$2"-[0-9]*.*.*-r*.apk https://codeberg.org/api/packages/"${CODEBERG_PACKAGE_REPO_USER:-"dmpmem"}"/alpine/latest-stable/"$1"
}
pushToRepo memdmp zsh-zuwu
if eval "file target/utau/${ARCH}/openutau-[0-9]*.*.*-r*.apk" >/dev/null 2>/dev/null; then
  pushToRepo utau openutau
  pushToRepo utau openutau-onnxruntime
  pushToRepo utau openutau-worldline
fi