funkwhale/scripts/set-api-build-metadata.sh

10 wiersze
285 B
Bash
Executable File

#!/bin/sh -eu
# given a commit hash, will append this to the version number stored
# in api/funkwhale_api/__init__.py
commit=$1
suffix="+git.$commit"
replace="__version__ = \"\1${suffix}\""
file="api/funkwhale_api/__init__.py"
sed -i -E 's@__version__ = \"(.*)\"@'"$replace"'@' $file