Merge pull request #298303 from a-n-n-a-l-e-e/fix-warp-update-script
warp-terminal: fix update script and update
This commit is contained in:
commit
696b91feb8
2 changed files with 11 additions and 10 deletions
|
@ -3,7 +3,8 @@
|
|||
#shellcheck shell=bash
|
||||
set -eu -o pipefail
|
||||
|
||||
dirname="$(dirname "$0")"
|
||||
cd "$(dirname "$0")"
|
||||
nixpkgs=../../../../.
|
||||
|
||||
err() {
|
||||
echo "$*" >&2
|
||||
|
@ -11,11 +12,11 @@ err() {
|
|||
}
|
||||
|
||||
json_get() {
|
||||
jq -r "$1" < "$dirname/versions.json"
|
||||
jq -r "$1" < "./versions.json"
|
||||
}
|
||||
|
||||
json_set() {
|
||||
jq --arg x "$2" "$1 = \$x" < "$dirname/versions.json" | sponge "$dirname/versions.json"
|
||||
jq --arg x "$2" "$1 = \$x" < "./versions.json" | sponge "./versions.json"
|
||||
}
|
||||
|
||||
resolve_url() {
|
||||
|
@ -53,10 +54,10 @@ get_version() {
|
|||
sri_get() {
|
||||
local ouput sri
|
||||
output=$(nix-build --expr \
|
||||
'with import <nixpkgs>{};
|
||||
"with import $nixpkgs {};
|
||||
fetchurl {
|
||||
url = "'"$1"'";
|
||||
}' 2>&1 || true)
|
||||
url = \"$1\";
|
||||
}" 2>&1 || true)
|
||||
sri=$(echo "$output" | awk '/^\s+got:\s+/{ print $2 }')
|
||||
[[ -z "$sri" ]] && err "$output"
|
||||
echo "$sri"
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
"darwin": {
|
||||
"hash": "sha256-GgaRlROSWYZgFlH0bH6PTnRE3L/bb0kX0P6m7nmPlsY=",
|
||||
"version": "0.2024.03.12.08.02.stable_01"
|
||||
"hash": "sha256-aOw/c6Y+4x6kwxcwnajHh92ZZDeaM/Y1df76HgUjVn8=",
|
||||
"version": "0.2024.03.19.08.01.stable_01"
|
||||
},
|
||||
"linux": {
|
||||
"hash": "sha256-9reFBIu32TzxE46c3PBVzkZYaMV4HVDASvTAVQltYN0=",
|
||||
"version": "0.2024.03.12.08.02.stable_01"
|
||||
"hash": "sha256-efnYh48xcLneeotH9iSY0xQRgMXI/erM6F2fIH38yjY=",
|
||||
"version": "0.2024.03.19.08.01.stable_01"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue