feat: update workflow
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
git_root=$(git rev-parse --show-toplevel)
|
||||
updated=false
|
||||
|
||||
echo "updating client"
|
||||
cd "${git_root}/client"
|
||||
@ -9,6 +10,7 @@ if ! git diff --exit-code package.json package-lock.json; then
|
||||
git add package-lock.json
|
||||
git add package.json
|
||||
git commit -m "build(client): updated npm dependencies"
|
||||
updated=true
|
||||
fi
|
||||
|
||||
echo "updating server"
|
||||
@ -19,12 +21,15 @@ if ! git diff --exit-code go.mod go.sum; then
|
||||
git add go.mod
|
||||
git add go.sum
|
||||
git commit -m "build(go): updated go dependencies"
|
||||
updated=true
|
||||
fi
|
||||
|
||||
echo "updating nix"
|
||||
cd "${git_root}"
|
||||
nix-update --flake --version=skip --subpackage trevstack-client trevstack
|
||||
if ! git diff --exit-code flake.nix; then
|
||||
if [ "${updated}" = true ]; then
|
||||
echo "updating nix"
|
||||
cd "${git_root}"
|
||||
nix-update --flake --version=skip --subpackage trevstack-client trevstack
|
||||
git add flake.nix
|
||||
git commit -m "build(nix): updated nix hashes"
|
||||
else
|
||||
echo "nothing to update"
|
||||
fi
|
Reference in New Issue
Block a user