summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Kangas <gabek@real-ity.com>2021-01-11 19:38:44 -0800
committerGabe Kangas <gabek@real-ity.com>2021-01-11 19:44:02 -0800
commitaed6ea432ca1887072861b14044b35bda5e61726 (patch)
tree4fffb2aeeb5c6422b724dc36c803fc88dba24c32
parentf9916207c8bbfc70ba4560092a171306f11542eb (diff)
Tweak build scriptv0.0.5
-rwxr-xr-xbuild/release/build.sh22
1 files changed, 19 insertions, 3 deletions
diff --git a/build/release/build.sh b/build/release/build.sh
index 352b30bdb..5150a177b 100755
--- a/build/release/build.sh
+++ b/build/release/build.sh
@@ -11,14 +11,27 @@ ARCH=(amd64 amd64 386 arm-7)
VERSION=$1
SHOULD_RELEASE=$2
+# Build info
+GIT_COMMIT=$(git rev-list -1 HEAD)
+GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
+
if [[ -z "${VERSION}" ]]; then
echo "Version must be specified when running build"
exit
fi
+BUILD_TEMP_DIRECTORY="$(mktemp -d)"
+cd $BUILD_TEMP_DIRECTORY
+
+echo "Cloning owncast into $BUILD_TEMP_DIRECTORY..."
+git clone --depth 1 https://github.com/owncast/owncast 2> /dev/null
+cd owncast
+
+echo "Changing to branch: $GIT_BRANCH"
+git checkout $GIT_BRANCH
+
[[ -z "${VERSION}" ]] && VERSION='unknownver' || VERSION="${VERSION}"
-GIT_COMMIT=$(git rev-list -1 HEAD)
-GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
+
# Change to the root directory of the repository
cd $(git rev-parse --show-toplevel)
@@ -77,9 +90,12 @@ for i in "${!DISTRO[@]}"; do
build ${DISTRO[$i]} ${OS[$i]} ${ARCH[$i]} $VERSION $GIT_COMMIT
done
+echo "Build archives are available in $BUILD_TEMP_DIRECTORY/owncast/dist"
+ls -alh "$BUILD_TEMP_DIRECTORY/owncast/dist"
+
# Use the second argument "release" to create an actual release.
if [ "$SHOULD_RELEASE" != "release" ]; then
- echo "Not creating a release."
+ echo "Not uploading a release."
exit
fi