2023-07-07 16:59:24 +00: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-28 16:38:48 +00:00
|
|
|
./script/build_${OS}.sh
|
2023-07-13 02:16:39 +00:00
|
|
|
|
2023-07-07 16:59:24 +00: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-26 18:04:36 +00:00
|
|
|
git push origin v$VERSION
|
|
|
|
|
2023-07-07 16:59:24 +00:00
|
|
|
# Create a new release.
|
2023-07-26 18:04:36 +00:00
|
|
|
gh release create -p v$VERSION -t v$VERSION
|
2023-07-07 16:59:24 +00:00
|
|
|
|
|
|
|
# Upload the zip file.
|
2023-07-28 16:38:48 +00:00
|
|
|
gh release upload v$VERSION ./dist/* --clobber
|