update-status-go: does not need to depend on make shell
The dependency on `make shell` is confusing and unnecessary since `update-status-go.sh` script only requires availability of the `nix-prefetch-url` utility to check SHA256 of the `status-go` verison. Use of `make shell` with this script can also cause issues when running `make run-android` if already in the shell, which prevents spawning a new one and effectively stops changes to `status-go-verison.json` file taking effect. Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
4f4651baac
commit
a76e4666de
|
@ -1,18 +1,19 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
if [[ ! -x "$(command -v nix-prefetch-url)" ]] && [[ -z "${IN_NIX_SHELL}" ]]; then
|
GIT_ROOT=$(cd "${BASH_SOURCE%/*}" && git rev-parse --show-toplevel)
|
||||||
echo "Remember to call 'make shell'!"
|
source "${GIT_ROOT}/nix/scripts/source.sh"
|
||||||
|
|
||||||
|
if [[ ! -x "$(command -v nix-prefetch-url)" ]]; then
|
||||||
|
echo "No 'nix-prefetch-url' utility found!" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -ef
|
set -ef
|
||||||
|
|
||||||
urlencode() {
|
|
||||||
# urlencode <string>
|
# urlencode <string>
|
||||||
|
urlencode() {
|
||||||
old_lc_collate=$LC_COLLATE
|
old_lc_collate=$LC_COLLATE
|
||||||
LC_COLLATE=C
|
LC_COLLATE=C
|
||||||
|
|
||||||
local length="${#1}"
|
local length="${#1}"
|
||||||
for (( i = 0; i < length; i++ )); do
|
for (( i = 0; i < length; i++ )); do
|
||||||
local c="${1:$i:1}"
|
local c="${1:$i:1}"
|
||||||
|
@ -21,11 +22,9 @@ urlencode() {
|
||||||
*) printf '%%%02X' "'$c";;
|
*) printf '%%%02X' "'$c";;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
LC_COLLATE=$old_lc_collate
|
LC_COLLATE=$old_lc_collate
|
||||||
}
|
}
|
||||||
|
|
||||||
GIT_ROOT="$(cd "${BASH_SOURCE%/*}" && git rev-parse --show-toplevel)"
|
|
||||||
VERSION_FILE="${GIT_ROOT}/status-go-version.json"
|
VERSION_FILE="${GIT_ROOT}/status-go-version.json"
|
||||||
SCRIPT_FILE="$(basename "$0")"
|
SCRIPT_FILE="$(basename "$0")"
|
||||||
|
|
||||||
|
@ -97,7 +96,8 @@ STATUS_GO_SHA256=$(nix-prefetch-url --unpack ${REPO_URL}/archive/$(urlencode ${S
|
||||||
|
|
||||||
cat << EOF > ${VERSION_FILE}
|
cat << EOF > ${VERSION_FILE}
|
||||||
{
|
{
|
||||||
"_comment": "DO NOT EDIT THIS FILE BY HAND. USE 'scripts/update-status-go.sh <tag>' instead",
|
"_comment": "THIS SHOULD NOT BE EDITED BY HAND.",
|
||||||
|
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
||||||
"owner": "${STATUS_GO_OWNER}",
|
"owner": "${STATUS_GO_OWNER}",
|
||||||
"repo": "${STATUS_GO_REPO}",
|
"repo": "${STATUS_GO_REPO}",
|
||||||
"version": "${STATUS_GO_VERSION}",
|
"version": "${STATUS_GO_VERSION}",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"_comment": "DO NOT EDIT THIS FILE BY HAND. USE 'scripts/update-status-go.sh <tag>' instead",
|
"_comment": "THIS SHOULD NOT BE EDITTED BY HAND.",
|
||||||
|
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
||||||
"owner": "status-im",
|
"owner": "status-im",
|
||||||
"repo": "status-go",
|
"repo": "status-go",
|
||||||
"version": "v0.86.3",
|
"version": "v0.86.3",
|
||||||
|
|
Loading…
Reference in New Issue