check for latest in _do_bump_version

This commit is contained in:
sentriz
2020-04-01 17:05:01 +01:00
parent 79dbd4d322
commit 0b0f336be1
8 changed files with 17 additions and 11 deletions

View File

@@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
# using sh, is run from alpine
. ./_build_vars . ./_build_vars
go build \ go build \

View File

@@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
# using sh, is run from alpine
. ./_build_vars . ./_build_vars
./_do_gen_assets ./_do_gen_assets

View File

@@ -1,16 +1,19 @@
#!/bin/sh #!/usr/bin/env bash
# safety checks # safety checks
if [[ $# -ne 1 ]]; then if [[ $# -ne 1 ]]; then
echo "usage: $0 <major|minor|patch>" >&2 echo "usage: $0 <major|minor|patch>" >&2
exit 1 exit 1
fi fi
if [[ -n "$(git status --porcelain)" ]]; then if [[ "$(git rev-parse --abbrev-ref HEAD)" != 'master' ]]; then
echo "working directory is dirty" >&2 echo "not on the master branch" >&2
exit 1 exit 1
fi fi
if [[ "$(git branch --show-current)" != 'master' ]]; then
echo "not on the master branch" >&2 # get latest and check if clean
git pull
if [[ -n "$(git status --porcelain)" ]]; then
echo "working directory is dirty" >&2
exit 1 exit 1
fi fi

View File

@@ -1,10 +1,11 @@
#!/bin/sh #!/bin/sh
# using sh, is run from alpine
embed_bin_path=/tmp/gonicembed embed_bin_path=/tmp/gonicembed
assets_path=server/assets assets_path=server/assets
# only build once for some slightly faster live page reloading # only build once for some slightly faster live page reloading
if ! test -e "$embed_bin_path"; then if [[ ! -e "$embed_bin_path" ]]; then
go build \ go build \
-o "$embed_bin_path" \ -o "$embed_bin_path" \
cmd/gonicembed/main.go cmd/gonicembed/main.go

View File

@@ -1,11 +1,11 @@
#!/bin/sh #!/usr/bin/env bash
test_data_path=server/ctrlsubsonic/testdata test_data_path=server/ctrlsubsonic/testdata
test_listen_addr=localhost:9353 test_listen_addr=localhost:9353
test_music_path=~/music test_music_path=~/music
test_db_path=$test_data_path/db test_db_path=$test_data_path/db
if test "$1" == "--scan"; then if [[ "$1" == "--scan" ]]; then
echo -e "\e[91mwarning: \e[39mthe --scan option was passed" echo -e "\e[91mwarning: \e[39mthe --scan option was passed"
echo "- this option should only be used if the database schema changes" echo "- this option should only be used if the database schema changes"
echo "- the test json will likely change a lot" echo "- the test json will likely change a lot"

View File

@@ -1,4 +1,4 @@
#!/bin/sh #!/usr/bin/env bash
. ./_build_vars . ./_build_vars
go run \ go run \

View File

@@ -1,4 +1,4 @@
#!/bin/sh #!/usr/bin/env bash
. ./_build_vars . ./_build_vars
./_do_gen_assets ./_do_gen_assets

View File

@@ -1,4 +1,4 @@
#!/bin/sh #!/usr/bin/env bash
if ! command -v 'entr' > /dev/null; then if ! command -v 'entr' > /dev/null; then
echo 'please install `entr`' >&2 echo 'please install `entr`' >&2