chore: fix shell scripts lint errors

This commit is contained in:
jo 2022-11-24 21:14:59 +01:00 committed by JuniorJPDJ
commit d47fef0806
23 changed files with 359 additions and 228 deletions

View file

@ -1,9 +1,13 @@
#!/bin/sh -eu
#!/usr/bin/env bash
set -eux
# 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
COMMIT=$1
FILE="api/funkwhale_api/__init__.py"
SUFFIX="\1+git.$COMMIT"
EXPR=$(printf 's@__version__ = "(.*)"@__version__ = "%s"@' "$SUFFIX")
sed -i -E "$EXPR" "$FILE"