update fileshare
This commit is contained in:
@@ -12,7 +12,7 @@ buildGoModule rec {
|
||||
src = fetchGit {
|
||||
url = "git@github.com:kropatz/kop-fileshare.git";
|
||||
ref = "master";
|
||||
rev = "211c9654ee76404136dcaec5141d7a885666e823";
|
||||
rev = "3b703425684efce51692a05c3f77f0ad9e4a7eb7";
|
||||
};
|
||||
vendorHash = "sha256-OQ6rNgOQHrrhE7DT+ulwpWJCDJ4DeJiDzriAu3mfS7I=";
|
||||
|
||||
|
||||
21
pkgs/kop-fileshare/update.sh
Executable file
21
pkgs/kop-fileshare/update.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p jq nix-prefetch-git
|
||||
|
||||
set -e
|
||||
|
||||
PACKAGE_FILE="default.nix" # Replace with your package file path
|
||||
REPO_URL="git@github.com:kropatz/kop-fileshare.git" # Replace with the repository URL
|
||||
|
||||
SCRIPT_DIR=$(dirname $(realpath $0))
|
||||
|
||||
echo "Fetching latest revision from $REPO_URL..."
|
||||
|
||||
# Get the latest revision and sha256
|
||||
latest_rev=$(nix-prefetch-git $REPO_URL | jq -r '.rev')
|
||||
|
||||
echo "Latest revision: $latest_rev"
|
||||
|
||||
# Update the package file with the new revision and sha256
|
||||
sed -i "s|rev = \".*\";|rev = \"$latest_rev\";|" "$SCRIPT_DIR"/$PACKAGE_FILE
|
||||
|
||||
echo "Package file $SCRIPT_DIR $PACKAGE_FILE updated successfully."
|
||||
Reference in New Issue
Block a user