fix all workflows: use env vars for python f-strings
This commit is contained in:
@@ -55,12 +55,16 @@ jobs:
|
||||
url="https://github.com/zen-browser/desktop/releases/download/${latest_version}/zen-x86_64.AppImage"
|
||||
new_hash=$(nix store prefetch-file --json "$url" | python -c 'import json,sys; print(json.load(sys.stdin)["hash"])')
|
||||
|
||||
export LATEST_VERSION="$latest_version"
|
||||
export NEW_HASH="$new_hash"
|
||||
|
||||
python - <<PY
|
||||
import re
|
||||
import os
|
||||
p='modules/pkgs/zen-browser.nix'
|
||||
s=open(p).read()
|
||||
s=re.sub(r'version\s*=\s*"[^"]+"', f'version = "{latest_version}"', s, count=1)
|
||||
s=re.sub(r'hash\s*=\s*"[^"]+"', f'hash = "{new_hash}"', s, count=1)
|
||||
s=re.sub(r'version\s*=\s*"[^"]+"', f'version = "{os.environ["LATEST_VERSION"]}"', s, count=1)
|
||||
s=re.sub(r'hash\s*=\s*"[^"]+"', f'hash = "{os.environ["NEW_HASH"]}"', s, count=1)
|
||||
open(p,'w').write(s)
|
||||
PY
|
||||
|
||||
|
||||
Reference in New Issue
Block a user