diff --git a/.back/scripts/hello.nix b/.back/scripts/hello.nix deleted file mode 100644 index 44bc156d1b9fe2a2a032453e1358f1a5088129e7..0000000000000000000000000000000000000000 --- a/.back/scripts/hello.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ pkgs }: - -pkgs.writeShellScriptBin "hello-world" '' - echo "Hello, world!" -'' diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7da94d77b970918350d2cf5ed1bb595abbfea39f..42ac17eab2bfe497ec8fc16be4128d7b020ac0ff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,12 +22,12 @@ stages: - test - deploy -before_script: - - echo > .env-gitlab-ci - - variables=("HOME=$HOME" "CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME" "CI_REPOSITORY_URL=$CI_REPOSITORY_URL" "GITLAB_TOKEN=$GITLAB_TOKEN" "CI_JOB_TOKEN=$CI_JOB_TOKEN" "GITLAB_USER_EMAIL=$GITLAB_USER_EMAIL" "GITLAB_USER_NAME=\"$GITLAB_USER_NAME\"" "CI_REGISTRY_USER=$CI_REGISTRY_USER" "CI_PROJECT_ID=$CI_PROJECT_ID" "CI_PROJECT_DIR=$CI_PROJECT_DIR" "CI_API_V4_URL=$CI_API_V4_URL" "CI_PROJECT_NAME=$CI_PROJECT_NAME" "CI_COMMIT_SHORT_SHA=$CI_COMMIT_SHORT_SHA"); for var in "${variables[@]}"; do echo "$var" >> .env-gitlab-ci; done - - cat .env-gitlab-ci - - env - - nix shell nixpkgs#docker-client -c docker info +#before_script: + #- echo > .env-gitlab-ci + #- variables=("HOME=$HOME" "CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME" "CI_REPOSITORY_URL=$CI_REPOSITORY_URL" "GITLAB_TOKEN=$GITLAB_TOKEN" "CI_JOB_TOKEN=$CI_JOB_TOKEN" "GITLAB_USER_EMAIL=$GITLAB_USER_EMAIL" "GITLAB_USER_NAME=\"$GITLAB_USER_NAME\"" "CI_REGISTRY_USER=$CI_REGISTRY_USER" "CI_PROJECT_ID=$CI_PROJECT_ID" "CI_PROJECT_DIR=$CI_PROJECT_DIR" "CI_API_V4_URL=$CI_API_V4_URL" "CI_PROJECT_NAME=$CI_PROJECT_NAME" "CI_COMMIT_SHORT_SHA=$CI_COMMIT_SHORT_SHA"); for var in "${variables[@]}"; do echo "$var" >> .env-gitlab-ci; done + #- cat .env-gitlab-ci + #- env + #- nix shell nixpkgs#docker-client -c docker info after_script: - if [ -f .env-gitlab-ci ]; then rm .env-gitlab-ci; fi @@ -53,7 +53,9 @@ deploy: tags: - nixos script: - - devenv shell -c deploy-lib + - nix develop --command deploy + after_script: + - nix develop --command cleanup when: on_success diff --git a/.idea/workspace.xml b/.idea/workspace.xml index d5066fed9ba4e1cc66b2e9378c8646838cf3ae09..d736d357be36cc09f467425811f388b08cc27655 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,87 +5,14 @@ </component> <component name="ChangeListManager"> <list default="true" id="9979eb22-471e-4f2f-b624-fd3edb5e8c6e" name="Changes" comment=""> - <change afterPath="$PROJECT_DIR$/nix/scripts/deploy.nix" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/.back/Taskfile.yml" beforeDir="false" /> + <change afterPath="$PROJECT_DIR$/nix/scripts/cleanup.nix" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/.back/scripts/hello.nix" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/.gitlab-ci.yml" beforeDir="false" afterPath="$PROJECT_DIR$/.gitlab-ci.yml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/flake.lock" beforeDir="false" afterPath="$PROJECT_DIR$/flake.lock" afterDir="false" /> <change beforePath="$PROJECT_DIR$/flake.nix" beforeDir="false" afterPath="$PROJECT_DIR$/flake.nix" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/filippo.io/edwards25519/LICENSE" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/fsnotify/fsnotify/LICENSE" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/.github/CONTRIBUTING.md" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/.github/ISSUE_TEMPLATE.md" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/.github/PULL_REQUEST_TEMPLATE.md" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/.github/workflows/codeql.yml" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/.github/workflows/test.yml" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/.gitignore" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/AUTHORS" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/CHANGELOG.md" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/LICENSE" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/README.md" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/atomic_bool.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/atomic_bool_go118.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/atomic_bool_test.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/auth.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/auth_test.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/benchmark_test.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/buffer.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/collations.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/conncheck.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/conncheck_dummy.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/conncheck_test.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/connection.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/connection_test.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/connector.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/connector_test.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/const.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/driver.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/driver_test.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/dsn.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/dsn_fuzz_test.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/dsn_test.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/errors.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/errors_test.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/fields.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/go.mod" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/go.sum" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/infile.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/nulltime.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/nulltime_test.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/packets.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/packets_test.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/result.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/rows.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/statement.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/statement_test.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/transaction.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/utils.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/go-sql-driver/mysql/utils_test.go" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/google/uuid/LICENSE" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/jinzhu/inflection/LICENSE" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/jinzhu/now/License" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/kr/fs/LICENSE" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/pkg/sftp/LICENSE" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/robfig/cron/v3/LICENSE" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/shirou/gopsutil/v3/LICENSE" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/tklauser/go-sysconf/LICENSE" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/github.com/tklauser/numcpus/LICENSE" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/go.uber.org/multierr/LICENSE.txt" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/go.uber.org/zap/LICENSE" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/golang.org/x/crypto/LICENSE" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/golang.org/x/sys/unix/LICENSE" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/gopkg.in/yaml.v3/LICENSE" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/gopkg.in/yaml.v3/NOTICE" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/gorm.io/driver/mysql/License" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/licenses/gorm.io/gorm/LICENSE" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/nix/scripts/build-cover-report.nix" beforeDir="false" afterPath="$PROJECT_DIR$/nix/scripts/build-cover-report.nix" afterDir="false" /> <change beforePath="$PROJECT_DIR$/nix/scripts/check-code.nix" beforeDir="false" afterPath="$PROJECT_DIR$/nix/scripts/check-code.nix" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/nix/scripts/common.nix" beforeDir="false" afterPath="$PROJECT_DIR$/nix/scripts/common.nix" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/nix/scripts/deploy.nix" beforeDir="false" afterPath="$PROJECT_DIR$/nix/scripts/deploy.nix" afterDir="false" /> <change beforePath="$PROJECT_DIR$/nix/scripts/go-task.nix" beforeDir="false" afterPath="$PROJECT_DIR$/nix/scripts/go-task.nix" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/nix/scripts/run-ci-tests.nix" beforeDir="false" afterPath="$PROJECT_DIR$/nix/scripts/run-ci-tests.nix" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/nix/scripts/run-extended-tests.nix" beforeDir="false" afterPath="$PROJECT_DIR$/nix/scripts/run-extended-tests.nix" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/nix/scripts/run-tests.nix" beforeDir="false" afterPath="$PROJECT_DIR$/nix/scripts/run-tests.nix" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/schedule-time_test.go" beforeDir="false" afterPath="$PROJECT_DIR$/schedule-time_test.go" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/scheduler_test.go" beforeDir="false" afterPath="$PROJECT_DIR$/scheduler_test.go" afterDir="false" /> </list> <option name="SHOW_DIALOG" value="false" /> <option name="HIGHLIGHT_CONFLICTS" value="true" /> diff --git a/flake.nix b/flake.nix index d7238c730331e1927c70527e9386ccaedb82f39a..a3d03cb57d05a2a5fc47f1e8994cfbb0778a4f32 100644 --- a/flake.nix +++ b/flake.nix @@ -23,9 +23,8 @@ script-run-ci-tests = pkgs'.callPackage ./nix/scripts/run-ci-tests.nix {}; script-check-code = pkgs'.callPackage ./nix/scripts/check-code.nix {}; script-build-cover-report = pkgs'.callPackage ./nix/scripts/build-cover-report.nix {}; - + import-version = version.packages.${system}.version; - in { devShells = { default = let @@ -39,7 +38,7 @@ script-check-code script-build-cover-report script-task - + import-version alejandra diff --git a/nix/scripts/check-code.nix b/nix/scripts/check-code.nix index c056389939f4a0db8f73fcc35d5ee83fe8ebfcca..2b0c136e51e1aa35f34c1821179ef92a3f3abafa 100644 --- a/nix/scripts/check-code.nix +++ b/nix/scripts/check-code.nix @@ -7,71 +7,71 @@ in pkgs.writeShellScriptBin "check-code" '' - ${common} + ${common} - echo_header "Checking code" - cd_working_dir + echo_header "Checking code" + cd_working_dir - echo_step "Formatting Nix code" - if ! ${pkgs.alejandra}/bin/alejandra flake.nix ./nix/scripts/*.nix - then - echo_fail "alejandra formatting failed" - exit 1 - fi + echo_step "Formatting Nix code" + if ! ${pkgs.alejandra}/bin/alejandra flake.nix ./nix/scripts/*.nix + then + echo_fail "alejandra formatting failed" + exit 1 + fi - ##format go code - echo_step "Formatting Go code" - if ! ${pkgs.go}/bin/gofmt -s -w . - then - echo_fail "gofmt failed" - exit 1 - fi + ##format go code + echo_step "Formatting Go code" + if ! ${pkgs.go}/bin/gofmt -s -w . + then + echo_fail "gofmt failed" + exit 1 + fi - echo_step "Add license headers" - if ! ${pkgs.addlicense}/bin/addlicense -c "schukai GmbH" -s -l "AGPL-3.0" ./*.go - then - echo_fail "addlicense failed" - exit 1 - fi - - echo_step "Running go test" - readonly defaultPacke=$(awk -F ' ' '/^module / { print $2 }' ./go.mod) - ${pkgs.go-licenses}/bin/go-licenses save "$defaultPacke" --ignore "gitlab.schukai.com" --force --save_path ./licenses/ - - echo_step "Running go vet" - if ! ${pkgs.go}/bin/go vet . - then - echo_fail "go vet failed" - exit 1 - fi + echo_step "Add license headers" + if ! ${pkgs.addlicense}/bin/addlicense -c "schukai GmbH" -s -l "AGPL-3.0" ./*.go + then + echo_fail "addlicense failed" + exit 1 + fi - echo_step "Running go fmt" - if ! ${pkgs.go}/bin/go fmt . - then - echo_fail "go fmt failed" - exit 1 - fi + echo_step "Running go test" + readonly defaultPacke=$(awk -F ' ' '/^module / { print $2 }' ./go.mod) + ${pkgs.go-licenses}/bin/go-licenses save "$defaultPacke" --ignore "gitlab.schukai.com" --force --save_path ./licenses/ - echo_step "Running go mod tidy" - if ! ${pkgs.go}/bin/go mod tidy - then - echo_fail "go mod tidy failed" - exit 1 - fi + echo_step "Running go vet" + if ! ${pkgs.go}/bin/go vet . + then + echo_fail "go vet failed" + exit 1 + fi - echo_step "Running lint" - if ! ${pkgs.golangci-lint}/bin/golangci-lint run . - then - echo_fail "lint failed" - exit 1 - fi + echo_step "Running go fmt" + if ! ${pkgs.go}/bin/go fmt . + then + echo_fail "go fmt failed" + exit 1 + fi - echo_step "Running gosec" - if ! ${pkgs.gosec}/bin/gosec . - then - echo_fail "gosec failed" - exit 1 - fi + echo_step "Running go mod tidy" + if ! ${pkgs.go}/bin/go mod tidy + then + echo_fail "go mod tidy failed" + exit 1 + fi + + echo_step "Running lint" + if ! ${pkgs.golangci-lint}/bin/golangci-lint run . + then + echo_fail "lint failed" + exit 1 + fi + + echo_step "Running gosec" + if ! ${pkgs.gosec}/bin/gosec -quiet . + then + echo_fail "gosec failed" + exit 1 + fi '' diff --git a/nix/scripts/cleanup.nix b/nix/scripts/cleanup.nix new file mode 100644 index 0000000000000000000000000000000000000000..8dc2182daa357b61b50d3ee04c6e94bea0223cd4 --- /dev/null +++ b/nix/scripts/cleanup.nix @@ -0,0 +1,16 @@ +{ + pkgs, + lib, + ... +}: let + common = pkgs.callPackage ./common.nix {}; +in + pkgs.writeShellScriptBin "clean-up" '' + ${common} + + echo_header "Cleaning up" + + ${pkgs.git}/bin/git config --global --unset credential.helper + if [ -f /root/.docker/config.json ]; then rm /root/.docker/config.json; fi + + '' diff --git a/nix/scripts/deploy.nix b/nix/scripts/deploy.nix index 0404ece86734a1949c246043759837029c4d000e..e82bab673771147444eed3a6d395afdcf3e14e25 100644 --- a/nix/scripts/deploy.nix +++ b/nix/scripts/deploy.nix @@ -4,14 +4,6 @@ ... }: let common = pkgs.callPackage ./common.nix {}; - - # Definieren eines schreibbaren Verzeichnisses - writableDir = pkgs.stdenv.mkDerivation { - name = "cover-report"; - buildCommand = '' - mkdir -p $out - ''; - }; in pkgs.writeShellScriptBin "deploy" '' ${common} @@ -19,7 +11,7 @@ in echo_header "Deploying" setup_go_env - + if [ -z "''$CI_JOB_TOKEN" ]; then echo_fail "Error: CI_JOB_TOKEN variable is not set." exit 1 @@ -29,34 +21,40 @@ in echo_fail "Error: CI_REPOSITORY_URL environment variable is not set." exit 1 fi - + + if [ -z "''${CI_PROJECT_DIR}" ]; then + echo_fail "Error: CI_PROJECT_DIR environment variable is not set." + exit 1 + fi + + cd ''${CI_PROJECT_DIR} || exit 1 + ${pkgs.git}/bin/git config --global user.email "''${GITLAB_USER_EMAIL}" ${pkgs.git}/bin/git config --global user.name "''${GITLAB_USER_NAME:-"Gitlab CI"}" + ${pkgs.git}/bin/git config --global credential.helper '!f() { echo "username=gitlab-ci-token"; echo "password=''${CI_JOB_TOKEN}"; }; f' ${pkgs.git}/bin/git config --global pull.rebase true ${pkgs.git}/bin/git config --global http.sslVerify "false" + ${pkgs.git}/bin/git remote set-url origin https://pad:''${GITLAB_TOKEN}@''${CI_REPOSITORY_URL#*@} ${pkgs.git}/bin/git fetch --all --tags --unshallow ${pkgs.git}/bin/git reset --hard origin/master + ${pkgs.git}/bin/git clean -fd ${pkgs.git}/bin/git checkout $CI_COMMIT_REF_NAME ${pkgs.git}/bin/git pull origin $CI_COMMIT_REF_NAME - if [ -z "''${CI_PROJECT_DIR}" ]; then - echo_fail "Error: CI_PROJECT_DIR environment variable is not set." - exit 1 - fi - - cd ''${CI_PROJECT_DIR} || exit 1 + ${pkgs.git}/bin/git --no-pager log --decorate=short --pretty=oneline + ${pkgs.git}/bin/git fetch --prune --prune-tags if ! ${pkgs.git}/bin/git --no-pager log --decorate=short --pretty=oneline then echo_fail "Error: Could not get git log." exit 1 fi - + echo_step "Bumping version" gitVersion=v$(version predict) - ${pkgs.git}/bin/git tag -a $gitVersion -m"chore: bump version" + ${pkgs.git}/bin/git tag -a $gitVersion -m"chore: bump version" ${pkgs.git}/bin/git --no-pager log --decorate=short --pretty=oneline ${pkgs.git}/bin/git push -o ci.skip origin ''${CI_COMMIT_REF_NAME} --tags diff --git a/nix/scripts/go-task.nix b/nix/scripts/go-task.nix index 7bc068fd706988432a6bd36c93bb69bcd5132e2c..99a206f8d02443ca01d101cef9bbd37053d27863 100644 --- a/nix/scripts/go-task.nix +++ b/nix/scripts/go-task.nix @@ -53,8 +53,11 @@ - gc - commit cmds: + - check-code - cd "{{.USER_WORKING_DIR}}" && cd $(git rev-parse --show-toplevel) && nix run git+https://gitlab.schukai.com/schukai/entwicklung/nix-flakes#git-commit --no-write-lock-file silent: true + env: + USER_WORKING_DIR: "{{.USER_WORKING_DIR}}" '';