Skip to content
Snippets Groups Projects

update production

5 files
+ 196
12
Compare changes
  • Side-by-side
  • Inline

Files

+ 8
6
@@ -54,8 +54,11 @@ main() {
checkout_source_branch "$SSHKEY" "$SERVER_HOST" "$PROJECT_PATH" "$DEFAULT_BRANCH" "$SOURCE_BRANCH"
build "result-before"
# If nothing changed, update_nixpkgs will just exit for us.
update_nixpkgs
# If nothing changed, report this and exit without an error.
if ! update_nixpkgs; then
echo "No changes."
exit 0
fi
build "result-after"
local DIFF=$(compute_diff "./result-before" "./result-after")
@@ -156,11 +159,10 @@ update_nixpkgs() {
# file instead of the one that's part of its own checkout.
nix-shell ../shell.nix --run 'update-nixpkgs ${PWD}/nixpkgs.json'
# Show us what we did - and signal a kind of error if we did nothing
# (expected in the case where nixpkgs hasn't changed since we last ran).
# Signal a kind of error if we did nothing (expected in the case where
# nixpkgs hasn't changed since we last ran).
if git diff --exit-code; then
echo "No changes."
exit 0
return 1
fi
}
Loading