Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Add the argument release to build script to actually release

Gabe Kangas0665530170e5
diff --git a/scripts/build.sh b/scripts/build.sh
index 36f3fd5d04..a0738d6b0a 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -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
+# Use the second argument "release" to create an actual release.
+if [ "$SHOULD_RELEASE" != "release" ]; then
+ echo "Not creating a release."
+ exit
+fi
+
# Create the tag
-# git tag -a "v${VERSION}" -m "Release build v${VERSION}"
+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
+# 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
\ No newline at end of file
+docker tag owncast gabekangas/owncast:$VERSION
+docker push gabekangas/owncast