mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
Add the argument release to build script to actually release
This commit is contained in:
parent
aaeea2bb1d
commit
b2ba9a2fcb
@ -9,6 +9,7 @@ ARCH=(amd64 amd64)
|
||||
|
||||
# Version
|
||||
VERSION=$1
|
||||
SHOULD_RELEASE=$2
|
||||
|
||||
if [[ -z "${VERSION}" ]]; then
|
||||
echo "Version must be specified when running build"
|
||||
@ -64,29 +65,35 @@ for i in "${!DISTRO[@]}"; do
|
||||
build ${DISTRO[$i]} ${OS[$i]} ${ARCH[$i]} $VERSION $GIT_COMMIT
|
||||
done
|
||||
|
||||
# Create the tag
|
||||
# git tag -a "v${VERSION}" -m "Release build v${VERSION}"
|
||||
# Use the second argument "release" to create an actual release.
|
||||
if [ "$SHOULD_RELEASE" != "release" ]; then
|
||||
echo "Not creating a release."
|
||||
exit
|
||||
fi
|
||||
|
||||
# # On macOS open the Github page for new releases so they can be uploaded
|
||||
# if test -f "/usr/bin/open"; then
|
||||
# open "https://github.com/gabek/owncast/releases/new"
|
||||
# open dist
|
||||
# fi
|
||||
# Create the tag
|
||||
git tag -a "v${VERSION}" -m "Release build v${VERSION}"
|
||||
|
||||
# On macOS open the Github page for new releases so they can be uploaded
|
||||
if test -f "/usr/bin/open"; then
|
||||
open "https://github.com/gabek/owncast/releases/new"
|
||||
open dist
|
||||
fi
|
||||
|
||||
# Docker build
|
||||
# Must authenticate first: https://docs.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages#authenticating-to-github-packages
|
||||
# DOCKER_IMAGE="owncast-${VERSION}"
|
||||
# echo "Building Docker image ${DOCKER_IMAGE}..."
|
||||
#
|
||||
# # Change to the root directory of the repository
|
||||
# cd $(git rev-parse --show-toplevel)
|
||||
#
|
||||
DOCKER_IMAGE="owncast-${VERSION}"
|
||||
echo "Building Docker image ${DOCKER_IMAGE}..."
|
||||
|
||||
# Change to the root directory of the repository
|
||||
cd $(git rev-parse --show-toplevel)
|
||||
|
||||
# Github Packages
|
||||
# docker build --build-arg NAME=docker --build-arg VERSION=${VERSION} --build-arg GIT_COMMIT=$GIT_COMMIT -t owncast . -f scripts/Dockerfile-build
|
||||
# docker tag $DOCKER_IMAGE docker.pkg.github.com/gabek/owncast/$DOCKER_IMAGE:$VERSION
|
||||
# docker push docker.pkg.github.com/gabek/owncast/$DOCKER_IMAGE:$VERSION
|
||||
docker build --build-arg NAME=docker --build-arg VERSION=${VERSION} --build-arg GIT_COMMIT=$GIT_COMMIT -t owncast . -f scripts/Dockerfile-build
|
||||
docker tag $DOCKER_IMAGE docker.pkg.github.com/gabek/owncast/$DOCKER_IMAGE:$VERSION
|
||||
docker push docker.pkg.github.com/gabek/owncast/$DOCKER_IMAGE:$VERSION
|
||||
#
|
||||
# Dockerhub
|
||||
# You must be authenticated via `docker login` with your Dockerhub credentials first.
|
||||
# docker tag owncast gabekangas/owncast:$VERSION
|
||||
# docker push gabekangas/owncast
|
||||
docker tag owncast gabekangas/owncast:$VERSION
|
||||
docker push gabekangas/owncast
|
||||
|
Loading…
x
Reference in New Issue
Block a user