Tweak and enable snapshots
This commit is contained in:
parent
9d10dc5dbb
commit
212fc530c1
3
.github/workflows/snapshot.yml
vendored
3
.github/workflows/snapshot.yml
vendored
@ -26,6 +26,3 @@ jobs:
|
|||||||
SECRET: ${{ secrets.ELIDRAGON_UPLOAD_TOKEN }}
|
SECRET: ${{ secrets.ELIDRAGON_UPLOAD_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
./upload.sh
|
./upload.sh
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,4 +1,4 @@
|
|||||||
build*/*
|
build/*
|
||||||
!build/debug.sh
|
!build/debug.sh
|
||||||
!build/debug_loop.sh
|
!build/debug_loop.sh
|
||||||
dragonblocks_alpha*
|
snapshot/*
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
A multiplayer voxelgame for POSIX systems.
|
A multiplayer voxelgame for POSIX systems.
|
||||||
It has been ported to Linux, Windows, FreeBSD and OpenBSD, but may work on other systems.
|
It has been ported to Linux, Windows, FreeBSD and OpenBSD, but may work on other systems.
|
||||||
|
|
||||||
Head to <https://www.elidragon.tk/dragonblocks_alpha/> for snapshot and release builds (CURRENTLY DOWN).
|
Head to <https://www.elidragon.tk/dragonblocks_alpha/> for snapshot and release builds.
|
||||||
|
|
||||||
## Invocation
|
## Invocation
|
||||||
|
|
||||||
|
67
snapshot.sh
67
snapshot.sh
@ -1,48 +1,49 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
VERSION=`git tag --points-at HEAD`
|
version="$(git describe --tags)"
|
||||||
if [[ $VERSION = "" ]]; then
|
|
||||||
VERSION=`git rev-parse --short HEAD`
|
mkdir "snapshot"
|
||||||
fi
|
cd "snapshot"
|
||||||
|
|
||||||
|
build="build"
|
||||||
|
snapshot="dragonblocks_alpha-$version"
|
||||||
|
toolchain=""
|
||||||
|
dotexe=""
|
||||||
|
dotsh=".sh"
|
||||||
|
flags="-Ofast"
|
||||||
|
|
||||||
BUILD=build-release
|
|
||||||
SNAPSHOT=dragonblocks_alpha-$VERSION
|
|
||||||
TOOLCHAIN=
|
|
||||||
DOTEXE=
|
|
||||||
DOTSH=".sh"
|
|
||||||
FLAGS="-Ofast"
|
|
||||||
if [[ "$1" != "" ]]; then
|
if [[ "$1" != "" ]]; then
|
||||||
BUILD=build-$1
|
build="$build-$1"
|
||||||
SNAPSHOT=dragonblocks_alpha-$1-$VERSION
|
snapshot="$snapshot-$1"
|
||||||
TOOLCHAIN=$1.cmake
|
toolchain="$1.cmake"
|
||||||
DOTEXE=".exe"
|
dotexe=".exe"
|
||||||
DOTSH=".bat"
|
dotsh=".bat"
|
||||||
FLAGS="$FLAGS -static"
|
flags="$flags -static"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p $BUILD
|
mkdir "$build"
|
||||||
|
|
||||||
cmake -B $BUILD -S src \
|
cmake -B "$build" -S ../src \
|
||||||
-DCMAKE_BUILD_TYPE="Release" \
|
-DCMAKE_BUILD_TYPE="Release" \
|
||||||
-DASSET_PATH="assets/" \
|
-DASSET_PATH="assets/" \
|
||||||
-DCMAKE_C_FLAGS="$FLAGS" \
|
-DCMAKE_C_FLAGS="$flags" \
|
||||||
-DCMAKE_CXX_FLAGS="$FLAGS" \
|
-DCMAKE_CXX_FLAGS="$flags" \
|
||||||
-DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN"
|
-DCMAKE_TOOLCHAIN_FILE="$toolchain"
|
||||||
|
|
||||||
make --no-print-directory -C $BUILD -j$(nproc)
|
make --no-print-directory -C "$build" -j"$(nproc)"
|
||||||
|
|
||||||
rm -rf $SNAPSHOT
|
rm -rf "$snapshot"
|
||||||
mkdir $SNAPSHOT
|
mkdir "$snapshot"
|
||||||
|
|
||||||
cp -r \
|
cp -r \
|
||||||
assets \
|
"../assets" \
|
||||||
$BUILD/dragonblocks_client$DOTEXE \
|
"$build/dragonblocks_client$dotexe" \
|
||||||
$BUILD/dragonblocks_server$DOTEXE \
|
"$build/dragonblocks_server$dotexe" \
|
||||||
singleplayer$DOTSH \
|
"../singleplayer$dotsh" \
|
||||||
LICENSE \
|
"../LICENSE" \
|
||||||
README.md \
|
"../README.md" \
|
||||||
$SNAPSHOT
|
"$snapshot"
|
||||||
|
|
||||||
rm -f $SNAPSHOT.zip
|
rm -f "$snapshot.zip"
|
||||||
zip -r $SNAPSHOT.zip $SNAPSHOT/*
|
zip -r "$snapshot.zip" "$snapshot"/*
|
||||||
|
@ -1,15 +1,8 @@
|
|||||||
execute_process(COMMAND git tag --points-at HEAD
|
execute_process(COMMAND git describe --tags
|
||||||
OUTPUT_VARIABLE GIT_VERSION
|
OUTPUT_VARIABLE GIT_VERSION
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
)
|
)
|
||||||
|
|
||||||
if("${GIT_VERSION}" STREQUAL "")
|
|
||||||
execute_process(COMMAND git rev-parse --short HEAD
|
|
||||||
OUTPUT_VARIABLE GIT_VERSION
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
version.h.in
|
version.h.in
|
||||||
${BINARY_DIR}/version.h
|
${BINARY_DIR}/version.h
|
||||||
|
27
upload.sh
27
upload.sh
@ -1,19 +1,22 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
echo "Snapshot uploading temporarily disabled"
|
set -e
|
||||||
exit
|
|
||||||
|
|
||||||
VERSION=`git tag --points-at HEAD`
|
name="$(git describe --tags)"
|
||||||
IS_RELEASE="1"
|
path="@snapshot/dragonblocks_alpha-$name"
|
||||||
if [[ $VERSION = "" ]]; then
|
ref="$(git tag --points-at HEAD)"
|
||||||
VERSION=`git rev-parse --short HEAD`
|
release="1"
|
||||||
IS_RELEASE="0"
|
|
||||||
|
if [[ "$ref" == "" ]]; then
|
||||||
|
ref="$(git rev-parse --short HEAD)"
|
||||||
|
release="0"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
curl -f -i -X POST -H "Content-Type: multipart/form-data" \
|
curl -f -i -X POST -H "Content-Type: multipart/form-data" \
|
||||||
-F "secret=$SECRET" \
|
-F "secret=$SECRET" \
|
||||||
-F "name=$VERSION" \
|
-F "name=$name" \
|
||||||
-F "is_release=$IS_RELEASE" \
|
-F "ref=$ref" \
|
||||||
-F "linux=@dragonblocks_alpha-$VERSION.zip" \
|
-F "release=$release" \
|
||||||
-F "win32=@dragonblocks_alpha-win32-$VERSION.zip" \
|
-F "Linux=$path.zip" \
|
||||||
-F "win64=@dragonblocks_alpha-win64-$VERSION.zip" \
|
-F "Win32=$path-win32.zip" \
|
||||||
|
-F "Win64=$path-win64.zip" \
|
||||||
https://elidragon.tk/dragonblocks_alpha/upload.php
|
https://elidragon.tk/dragonblocks_alpha/upload.php
|
||||||
|
Loading…
x
Reference in New Issue
Block a user