-
Notifications
You must be signed in to change notification settings - Fork 239
/
Taskfile.yaml
51 lines (47 loc) · 1.64 KB
/
Taskfile.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
version: '3'
tasks:
move-to-production:
desc: Move the current branch to production
cmds:
- cmd: git checkout master
silent: true
- cmd: git pull origin master
silent: true
- cmd: git tag -d production
ignore_error: false
silent: true
- cmd: git push origin :production
ignore_error: false
silent: true
- cmd: git tag production
ignore_error: false
silent: true
- cmd: git push origin production
ignore_error: false
silent: true
cli-prerelease:
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
cmds:
- task: semantic-check
- cmd: git fetch origin --tags
silent: true
- cmd: git checkout master
silent: true
- cmd: git pull origin master
silent: true
- cmd: git tag {{.CLI_ARGS}}
silent: true
ignore_error: false
- cmd: git push origin {{.CLI_ARGS}}
silent: true
ignore_error: false
- cmd: echo "View your pre-release at https://github.com/porter-dev/porter/releases/tag{{ .CLI_ARGS }}"
semantic-check:
preconditions:
- 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
msg: must use a semantic version such as v0.1.2
lint:
desc: Run all available linters. This mimics any checks performed in Pull Request pre-merge checks
cmd: golangci-lint run -c .github/golangci-lint.yaml
env:
GOWORK: off