Skip to content
Snippets Groups Projects
Verified Commit a49793d9 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: update deploy script

parent d87672b3
No related branches found
No related tags found
No related merge requests found
......@@ -45,13 +45,6 @@ in
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 mod tidy"
if ! ${pkgs.go}/bin/go mod tidy
then
......
......@@ -52,13 +52,15 @@ in
${pkgs.git}/bin/git fetch --prune --prune-tags
echo_step "Bumping version"
gitVersion=v$(version predict --exit-code-if-no-bump)
gitVersion=$(version predict --exit-code-if-no-bump)
if [ -z "$gitVersion" ]; then
echo_ok "There is no version bump."
echo_ok "done"
exit 0
fi
gitVersion="v$gitVersion"
${pkgs.git}/bin/git tag -a $gitVersion -m"chore: bump version"
${pkgs.git}/bin/git --no-pager log --decorate=short --pretty=oneline -n 5
${pkgs.git}/bin/git push -o ci.skip origin ''${CI_COMMIT_REF_NAME} --tags
......
{pkgs}: let
taskfile = builtins.toFile "taskfile.yml" ''
taskfile = pkgs.writeTextFile {
name = "taskfile.yml";
text = ''
version: '3'
tasks:
......@@ -56,13 +58,13 @@
- 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
- cd "{{.USER_WORKING_DIR}}" && cd $(${pkgs.git}/bin/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}}"
'';
};
in
pkgs.writeShellScriptBin "task" ''
${pkgs.go-task}/bin/task -t "${taskfile}" "$@"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment