build: add nightly build uploads to codeberg.org and git.flow-control.dev
This commit is contained in:
parent
366dde0144
commit
db16c26f0c
1 changed files with 44 additions and 5 deletions
|
@ -1,6 +1,14 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
for arg in "$@"; do
|
||||||
|
case "$arg" in
|
||||||
|
--no-github) NO_GITHUB=1 ;;
|
||||||
|
--no-codeberg) NO_CODEBERG=1 ;;
|
||||||
|
--no-flowcontrol) NO_FLOWCONTROL=1 ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
builddir="nightly-build"
|
builddir="nightly-build"
|
||||||
|
|
||||||
DESTDIR="$(pwd)/$builddir"
|
DESTDIR="$(pwd)/$builddir"
|
||||||
|
@ -47,9 +55,11 @@ last_nightly_version=$(curl -s "https://api.github.com/repos/$repo/releases/late
|
||||||
}
|
}
|
||||||
|
|
||||||
local_version="$(git --git-dir "$BASEDIR/.git" describe)"
|
local_version="$(git --git-dir "$BASEDIR/.git" describe)"
|
||||||
if [ "$local_version" == "$last_nightly_version" ]; then
|
if [ "$1" != "--no-github" ]; then
|
||||||
echo "$title is already at version $last_nightly_version"
|
if [ "$local_version" == "$last_nightly_version" ]; then
|
||||||
exit 1
|
echo "$title is already at version $last_nightly_version"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
@ -106,10 +116,39 @@ cd ..
|
||||||
{
|
{
|
||||||
echo "$title" "$VERSION"
|
echo "$title" "$VERSION"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo "commits:"
|
echo "commits:"
|
||||||
echo
|
echo
|
||||||
|
git log "${last_nightly_version}..HEAD" --pretty="format:neurocyte/$APPNAME@%h %s"
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo "contributors to this release:"
|
||||||
|
git shortlog -s -n "${last_nightly_version}..HEAD"
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo "also available at:"
|
||||||
|
echo "[git.flow-control.dev](https://git.flow-control.dev/neurocyte/flow-nightly/releases/tag/$VERSION)"
|
||||||
|
echo "[github.com](https://github.com/neurocyte/flow-nightly/releases/tag/$VERSION)"
|
||||||
|
echo "[flow-control.dev](https://codeberg.org/neurocyte/flow-nightly/releases/tag/$VERSION)"
|
||||||
} >"$release_notes"
|
} >"$release_notes"
|
||||||
git log "${last_nightly_version}..HEAD" --pretty="format:neurocyte/$APPNAME@%h %s" >>"$release_notes"
|
|
||||||
cat "$release_notes"
|
cat "$release_notes"
|
||||||
|
|
||||||
gh release create "$VERSION" --repo "$repo" --notes-file "$release_notes" $DESTDIR/*
|
if [ -z "$NO_GITHUB" ]; then
|
||||||
|
echo uploading to github.com
|
||||||
|
gh release create "$VERSION" --repo "$repo" --notes-file "$release_notes" $DESTDIR/*
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$NO_CODEBERG" ]; then
|
||||||
|
ASSETS=""
|
||||||
|
for a in $DESTDIR/*; do
|
||||||
|
ASSETS="$ASSETS --asset $a"
|
||||||
|
done
|
||||||
|
echo uploading to codeberg.org
|
||||||
|
tea releases create --login codeberg --repo "$repo" --tag "$VERSION" --title "$title $VERSION" --note-file "$release_notes" --prerelease $ASSETS
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$NO_FLOWCONTROL" ]; then
|
||||||
|
echo uploading to git.flow-control.dev
|
||||||
|
tea releases create --login flow-control --repo "$repo" --tag "$VERSION" --title "$title $VERSION" --note-file "$release_notes" --prerelease
|
||||||
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue