2022-11-24 21:14:59 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
|
|
set -eux
|
|
|
|
|
|
2019-01-10 14:55:28 +01:00
|
|
|
# given a commit hash, will append this to the version number stored
|
|
|
|
|
# in api/funkwhale_api/__init__.py
|
|
|
|
|
|
2022-11-24 21:14:59 +01:00
|
|
|
COMMIT=$1
|
|
|
|
|
FILE="api/funkwhale_api/__init__.py"
|
|
|
|
|
|
|
|
|
|
SUFFIX="\1+git.$COMMIT"
|
|
|
|
|
EXPR=$(printf 's@__version__ = "(.*)"@__version__ = "%s"@' "$SUFFIX")
|
|
|
|
|
sed -i -E "$EXPR" "$FILE"
|