ollama/scripts/publish.sh

26 lines
521 B
Bash
Raw Normal View History

2023-07-08 00:59:24 +08:00
# Set your variables here.
REPO="jmorganca/ollama"
# Check if VERSION is set
if [[ -z "${VERSION}" ]]; then
echo "VERSION is not set. Please set the VERSION environment variable."
exit 1
fi
OS=$(go env GOOS)
2023-07-29 00:38:48 +08:00
./script/build_${OS}.sh
2023-07-13 10:16:39 +08:00
2023-07-08 00:59:24 +08:00
# Create a new tag if it doesn't exist.
if ! git rev-parse v$VERSION >/dev/null 2>&1; then
git tag v$VERSION
fi
2023-07-27 02:04:36 +08:00
git push origin v$VERSION
2023-07-08 00:59:24 +08:00
# Create a new release.
2023-07-27 02:04:36 +08:00
gh release create -p v$VERSION -t v$VERSION
2023-07-08 00:59:24 +08:00
# Upload the zip file.
2023-07-29 00:38:48 +08:00
gh release upload v$VERSION ./dist/* --clobber