diff --git a/flake-modules/dev-shell.nix b/flake-modules/dev-shell.nix index 4ef789955..68f9ca267 100644 --- a/flake-modules/dev-shell.nix +++ b/flake-modules/dev-shell.nix @@ -20,6 +20,7 @@ (import ../drafts.nix { inherit pkgs; }) (import ../new-draft.nix { inherit pkgs; }) + (import ../publish.nix { inherit pkgs; }) ]; }; } diff --git a/publish.nix b/publish.nix new file mode 100644 index 000000000..a08a07c64 --- /dev/null +++ b/publish.nix @@ -0,0 +1,14 @@ +{ pkgs }: + +pkgs.writeShellApplication { + name = "publish"; + + runtimeInputs = with pkgs; [ rsync php ]; + + text = '' + vendor/bin/sculpin generate --env prod + + rsync -uvrP static/ output_prod "$@" + rsync -uvrP output_prod/ nixedo.oliverdavies.uk:/var/www/vhosts/website-sculpin "$@" + ''; +} diff --git a/tools/scripts/publish b/tools/scripts/publish deleted file mode 100755 index 1f5ab27b3..000000000 --- a/tools/scripts/publish +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o nounset -set -o pipefail - -vendor/bin/sculpin generate --env prod -rsync -uvrP static/ output_prod "$@" -rsync -uvrP output_prod/ nixedo.oliverdavies.uk:/var/www/vhosts/website-sculpin "$@"