git.iko.soy/typeable/nixpkgs
on master help sign in
matrix-appservice-irc: improve update script
commitbe0c385a5dbff42eece4b9efec028932cf1b3bc7 authorpiegames <git@piegames.de> dateSun 7 Nov 2021, 22:18 (5 years ago) parent7f54eb0
3 files changed+2−4
pkgs/servers/matrix-synapse/matrix-appservice-irc/REVISION−1 pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix+1−1 pkgs/servers/matrix-synapse/matrix-appservice-irc/update.sh+1−2
pkgs/servers/matrix-synapse/matrix-appservice-irc/REVISIONdeleted−1
@@ -1 +0,0 @@
1−0.30.0
pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix+1−1
@@ -5,7 +5,7 @@ let
55 inherit pkgs nodejs;
66 inherit (stdenv.hostPlatform) system;
77 };
8− version = builtins.replaceStrings [ "\n" ] [ "" ] (builtins.readFile ./REVISION);
8+ version = (lib.importJSON ./package.json).version;
99in
1010ourNodePackages.package.override {
1111 pname = "matrix-appservice-irc";
pkgs/servers/matrix-synapse/matrix-appservice-irc/update.sh+1−2
@@ -6,7 +6,7 @@ set -euo pipefail
66cd "$(dirname "$0")"
77
88CURRENT_VERSION=$(nix eval --raw '(with import ../../../../. {}; matrix-appservice-irc.version)')
9−TARGET_VERSION="$(curl https://api.github.com/repos/matrix-org/matrix-appservice-irc/releases/latest | jq -r ".tag_name")"
9+TARGET_VERSION="$(curl https://api.github.com/repos/matrix-org/matrix-appservice-irc/releases/latest | jq --exit-status -r ".tag_name")"
1010
1111if [[ "$CURRENT_VERSION" == "$TARGET_VERSION" ]]; then
1212 echo "matrix-appservice-irc is up-to-date: ${CURRENT_VERSION}"
@@ -18,7 +18,6 @@ echo "matrix-appservice-irc: $CURRENT_VERSION -> $TARGET_VERSION"
1818rm -f package.json package-lock.json
1919wget https://github.com/matrix-org/matrix-appservice-irc/raw/$TARGET_VERSION/package.json
2020wget -O package-lock-temp.json https://github.com/matrix-org/matrix-appservice-irc/raw/$TARGET_VERSION/package-lock.json
21−echo "$TARGET_VERSION" > ./REVISION
2221
2322./generate-dependencies.sh
2423