diff options
-rw-r--r-- | cmake/opentrack-tarball.cmake | 3 | ||||
-rw-r--r-- | make-tar.sh | 28 |
2 files changed, 20 insertions, 11 deletions
diff --git a/cmake/opentrack-tarball.cmake b/cmake/opentrack-tarball.cmake index 6b40081b..f26052f3 100644 --- a/cmake/opentrack-tarball.cmake +++ b/cmake/opentrack-tarball.cmake @@ -11,6 +11,9 @@ set(filename_1) if (NOT OPENTRACK_TAG_EXACT STREQUAL OPENTRACK_COMMIT) string(TIMESTAMP filename_1 "-%Y%m%d%H%M%S") endif() +if (NOT filename-branch STREQUAL "unstable") + string(CONCAT filename_0 ${filename_0} "-" ${filename-branch}) +endif() set(filename "${CMAKE_BINARY_DIR}/${filename_0}${filename_1}.zip") add_custom_target(tarball-real) diff --git a/make-tar.sh b/make-tar.sh index 08114127..abb83fdd 100644 --- a/make-tar.sh +++ b/make-tar.sh @@ -4,22 +4,28 @@ prefix="$1" filename="$2" bin="$3" +branch="$(git rev-parse --abbrev-ref HEAD)" + cmake --build "$bin" --target install -- -j4 || exit 1 -if : && +if : && cd $(dirname -- "${prefix}") && zip -9r "${filename}" $(basename "${prefix}") then - case "$USER,$(uname -s)" in - # for the script see https://github.com/andreafabrizi/Dropbox-Uploader - sthalik,CYGWIN_*) - dropbox_uploader.sh -p upload "$filename" / - bn="$(basename -- "$filename")" - l="$(dropbox_uploader.sh -q share /"$bn")" - test -n "$l" && echo -n "$l" | putclip - echo $l - echo -ne '\a' ;; - *) ls -lh -- "${filename}" ;; + case "$branch" in + unstable) + case "$USER,$(uname -s)" in + # for the script see https://github.com/andreafabrizi/Dropbox-Uploader + sthalik,CYGWIN_*) + dropbox_uploader.sh -p upload "$filename" / + bn="$(basename -- "$filename")" + l="$(dropbox_uploader.sh -q share /"$bn")" + test -n "$l" && echo -n "$l" | putclip + echo $l + echo -ne '\a' ;; + *) ls -lh -- "${filename}" ;; + esac ;; + *) ;; esac else rm -fv -- "${filename}" |