add update script
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
openOnSetup = true;
|
openOnSetup = true;
|
||||||
autoReloadOnWrite = true;
|
autoReloadOnWrite = true;
|
||||||
|
updateFocusedFile.enable = true;
|
||||||
tab.sync = {
|
tab.sync = {
|
||||||
close = true;
|
close = true;
|
||||||
open = true;
|
open = true;
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ buildNpmPackage rec {
|
|||||||
src = fetchGit {
|
src = fetchGit {
|
||||||
url = "git@github.com:oberprofis/adams.git";
|
url = "git@github.com:oberprofis/adams.git";
|
||||||
ref = "main";
|
ref = "main";
|
||||||
rev = "312d6117e00ef4415349d0af1141e4664c8db303";
|
rev = "c61c95fa924e6651efb3ea61a23994aa975d3572";
|
||||||
};
|
};
|
||||||
npmDepsHash="sha256-ndpuIqMAitnx0rswYD60l5JhDMdaKH77Qdu7zNgwj/o=";
|
npmDepsHash="sha256-ULxOaEpa2+YS45kh+2xCZMqXQs5bMYhy7J08DsFYE+s=";
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
cp -r ./dist/adams-site/* $out
|
cp -r ./dist/adams-site/* $out
|
||||||
|
|||||||
20
pkgs/adam-site/update.sh
Executable file
20
pkgs/adam-site/update.sh
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/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:oberprofis/adams.git" # Replace with the repository URL
|
||||||
|
|
||||||
|
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\";|" $PACKAGE_FILE
|
||||||
|
|
||||||
|
echo "Package file $PACKAGE_FILE updated successfully."
|
||||||
|
|
||||||
Reference in New Issue
Block a user