cockpit: add update script
Signed-off-by: lucasew <lucas59356@gmail.com>
This commit is contained in:
parent
435e4d9793
commit
92628a12d8
|
@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
|
|||
src = fetchFromGitHub {
|
||||
owner = "cockpit-project";
|
||||
repo = "cockpit";
|
||||
rev = "80a7c7cfed9157915067666fe95b298896f2aea8";
|
||||
rev = version;
|
||||
sha256 = "sha256-iAIW6nVUk1FJD2dQvDMREPVqrq0JkExJ7lVio//ALts=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
@ -215,7 +215,10 @@ stdenv.mkDerivation rec {
|
|||
npm run stylelint
|
||||
'';
|
||||
|
||||
passthru.tests = { inherit (nixosTests) cockpit; };
|
||||
passthru = {
|
||||
tests = { inherit (nixosTests) cockpit; };
|
||||
updateScript = ./update.sh;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Web-based graphical interface for servers";
|
||||
|
|
8
pkgs/servers/monitoring/cockpit/update.sh
Executable file
8
pkgs/servers/monitoring/cockpit/update.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq common-updater-scripts
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
version="$(curl --silent "https://api.github.com/repos/cockpit-project/cockpit/releases" | jq '.[0].tag_name' --raw-output)"
|
||||
|
||||
update-source-version cockpit "$version"
|
Loading…
Reference in a new issue