diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a67753c5f7f564eebdc45c301fc832e53137234c..ff3298531853b964cf71c5ad3cb03f539c73691f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,7 +25,6 @@ tests: tags: - nixos-gen3 script: - - printenv - nix develop .#gitlab --command run-ci-tests cache: untracked: true @@ -71,7 +70,7 @@ deploy: tags: - nixos-gen3 script: - - nix develop .#gitlab --command build-and-publish + - nix develop .#gitlab --command deploy when: on_success rules: - if: $DEPLOY_VERSION && $CI_COMMIT_TAG diff --git a/flake.nix b/flake.nix index dce67da01def1c2fb8bce47027d1c8318f429a0b..adf178b4130d80b4b0aba9c39476f3b1ce365fcc 100644 --- a/flake.nix +++ b/flake.nix @@ -125,7 +125,7 @@ scriptRunCITests = pkgs'.callPackage ./nix/scripts/run-ci-tests.nix {inherit pkgs';}; scriptRunCIWebTests = pkgs'.callPackage ./nix/scripts/run-ci-web-tests.nix {inherit pkgs';}; scriptRelease = pkgs'.callPackage ./nix/scripts/release.nix {inherit pkgs';}; - scriptBuildAndPublish = pkgs'.callPackage ./nix/scripts/build-and-publish.nix {inherit pkgs' system self;}; + scriptDeploy = pkgs'.callPackage ./nix/scripts/deploy.nix {inherit pkgs' system self;}; commonPackages = import ./nix/config/common-packages.nix {inherit pkgs';}; @@ -134,7 +134,7 @@ scriptRunCITests scriptRunCIWebTests scriptRelease - scriptBuildAndPublish + scriptDeploy ]; scriptPackages = [ diff --git a/nix/scripts/build-and-publish.nix b/nix/scripts/deploy.nix similarity index 88% rename from nix/scripts/build-and-publish.nix rename to nix/scripts/deploy.nix index e16391987dbc7ab3d4c0487d780c92b9c31571e6..6bb6bd73f00a7118a49f192741e0f74dca609c6e 100644 --- a/nix/scripts/build-and-publish.nix +++ b/nix/scripts/deploy.nix @@ -8,7 +8,7 @@ self, releaseInfo = import ../config/release.nix; monster = pkgs'.callPackage ../packages/monster.nix {inherit pkgs' system self;}; in - pkgs'.writeShellScriptBin "build-and-publish" '' + pkgs'.writeShellScriptBin "deploy" '' source ${pkgs'.common}/bin/common ${bashFktScript} @@ -16,7 +16,7 @@ in archive=$(ls ${monster} | grep tgz) ## npm instead of pnpm because of https://github.com/pnpm/pnpm/issues/7950 - if ! publishingResult=$(${pkgs'.nodejs_20}/bin/npm publish "${monster}/$archive" --json --dry-run --no-git-checks --access public) + if ! publishingResult=$(${pkgs'.nodejs_20}/bin/npm publish "${monster}/$archive" --json --no-git-checks --access public) then echo_fail "Failed to publish the project." exit 1 diff --git a/nix/scripts/go-task.nix b/nix/scripts/go-task.nix index 9c9b1dd27b1b6ca4a7e458b4eadc62d8db6c24a6..6bc87c19c5985adf2d6a76dfe7206908e2599250 100644 --- a/nix/scripts/go-task.nix +++ b/nix/scripts/go-task.nix @@ -8,7 +8,7 @@ scriptUpdateChangelog = pkgs'.callPackage ./update-changelog.nix {inherit pkgs' self system;}; scriptInitProject = pkgs'.callPackage ./init-project.nix {inherit pkgs' self system;}; scriptBuildStylesheets = pkgs'.callPackage ./build-stylesheets.nix {inherit pkgs' self system;}; - scriptBuildAndPublish = pkgs'.callPackage ./build-and-publish.nix {inherit pkgs' self system;}; + scriptDeploy = pkgs'.callPackage ./deploy.nix {inherit pkgs' self system;}; scriptUpdateWebTest = pkgs'.callPackage ./update-web-test.nix {inherit pkgs' self system;}; scriptRunTests = pkgs'.callPackage ./run-tests.nix {inherit pkgs' self system;}; scriptRunWebTests = pkgs'.callPackage ./run-web-tests.nix {inherit pkgs' self system;}; @@ -119,13 +119,13 @@ aliases: - e - build-and-publish: + deploy: silent: true env: USER_WORKING_DIR: "{{.USER_WORKING_DIR}}" desc: Build and publish the npm package cmds: - - ${scriptBuildAndPublish}/bin/build-and-publish + - ${scriptDeploy}/bin/deploy aliases: - p