Taskfile.yaml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. version: '3'
  2. tasks:
  3. move-to-production:
  4. desc: Move the current branch to production
  5. cmds:
  6. - cmd: git tag -d production
  7. ignore_error: false
  8. silent: true
  9. - cmd: git push origin :production
  10. ignore_error: false
  11. silent: true
  12. - cmd: git tag production
  13. ignore_error: false
  14. silent: true
  15. - cmd: git push origin production
  16. ignore_error: false
  17. silent: true
  18. cli-prerelease:
  19. desc: Create prerelease of CLI at the provided semantic version. Call `task cli-prerelease -- v1.2.3` where v1.2.3 is the desired tag for releasing
  20. cmds:
  21. - task: semantic-check
  22. - cmd: git fetch origin --tags
  23. silent: true
  24. - cmd: git checkout master
  25. silent: true
  26. - cmd: git pull origin master
  27. silent: true
  28. - cmd: git tag {{.CLI_ARGS}}
  29. silent: true
  30. ignore_error: false
  31. - cmd: git push origin {{.CLI_ARGS}}
  32. silent: true
  33. ignore_error: false
  34. - cmd: echo "View your pre-release at https://github.com/porter-dev/porter/releases/tag{{ .CLI_ARGS }}"
  35. semantic-check:
  36. preconditions:
  37. - sh: version={{ .CLI_ARGS }}; semantic_version_regex='^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$'; if [[ $version =~ $semantic_version_regex ]]; then; else exit 1; fi
  38. msg: must use a semantic version such as v0.1.2
  39. lint:
  40. desc: Run all available linters. This mimics any checks performed in Pull Request pre-merge checks
  41. cmd: golangci-lint run -c .github/golangci-lint.yaml
  42. env:
  43. GOWORK: off