File tree Expand file tree Collapse file tree 4 files changed +69
-0
lines changed Expand file tree Collapse file tree 4 files changed +69
-0
lines changed Original file line number Diff line number Diff line change 25
25
fi
26
26
echo ::set-output name=BRANCH::$(echo ${BRANCH} | cut -d '.' -f1-2 | tr -d 'v')
27
27
28
+ - name : Set up Go
29
+ uses : actions/setup-go@v2
30
+ with :
31
+ go-version : 1.17
32
+ id : go
33
+
34
+ - name : Bump main version
35
+ run : make patch
36
+
28
37
- name : Create a github branch
29
38
uses : peterjgrainger/action-create-branch@v2.0.1
30
39
env :
31
40
GITHUB_TOKEN : ${{ secrets.HOMEBREW_TAP_GH_TOKEN }}
32
41
with :
33
42
branch : ${{ steps.get_branch.outputs.BRANCH }}
43
+
44
+ - name : Commit changes to the minor branch
45
+ uses : EndBug/add-and-commit@v7
46
+ with :
47
+ default_author : user_info
48
+ message : ' Update patch version'
49
+ branch : ${{ steps.get_branch.outputs.BRANCH }}
50
+ author_name : elasticcloudclients
51
+ author_email : elasticcloudclients@elastic.co
52
+
53
+ bump-minor-version :
54
+ name : Bump main version
55
+ runs-on : ubuntu-latest
56
+ steps :
57
+ - name : Checkout
58
+ uses : actions/checkout@v2
59
+ with :
60
+ ref : master
61
+ token : ${{ secrets.GH_TOKEN }}
62
+
63
+ - name : Set up Go
64
+ uses : actions/setup-go@v2
65
+ with :
66
+ go-version : 1.17
67
+ id : go
68
+
69
+ - name : Bump main version
70
+ run : make minor; git diff
71
+
72
+ - name : Commit changes to main
73
+ uses : EndBug/add-and-commit@v7
74
+ with :
75
+ default_author : user_info
76
+ message : ' Update minor version'
77
+ branch : master
78
+ author_name : elasticcloudclients
79
+ author_email : elasticcloudclients@elastic.co
Original file line number Diff line number Diff line change @@ -10,3 +10,4 @@ include scripts/Makefile.help
10
10
include build/Makefile.build
11
11
include build/Makefile.dev
12
12
include build/Makefile.deps
13
+ include build/Makefile.version
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ VERSION_GOLICENSER:=v0.3.0
9
9
VERSION_GOLANGCILINT:=v1.38.0
10
10
VERSION_GOBINDATA:=v0.0.0-20190711162640-ee3c2418e368
11
11
VERSION_GORELEASER:=v0.156.1
12
+ VERSION_VERSIONBUMP:=v1.1.0
12
13
13
14
deps: $(GOBIN)/golint $(GOBIN)/go-licenser $(GOBIN)/golangci-lint $(GOBIN)/go-bindata $(GOBIN)/goreleaser
14
15
@@ -57,3 +58,11 @@ $(VERSION_DIR)/.version-goreleaser-$(VERSION_GORELEASER): | $(VERSION_DIR)
57
58
$(GOBIN)/goreleaser: $(VERSION_DIR)/.version-goreleaser-$(VERSION_GORELEASER) | $(GOBIN)
58
59
@ echo "-> Installing goreleaser..."
59
60
@ curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh| sh -s -- -b $(GOBIN) $(VERSION_GORELEASER)
61
+
62
+ $(VERSION_DIR)/.version-versionbump-$(VERSION_VERSIONBUMP):
63
+ @ rm -f $(VERSION_DIR)/.version-versionbump-*
64
+ @ echo $(VERSION_VERSIONBUMP) > $(VERSION_DIR)/.version-versionbump-$(VERSION_VERSIONBUMP)
65
+
66
+ $(GOBIN)/versionbump: $(VERSION_DIR)/.version-versionbump-$(VERSION_VERSIONBUMP) | $(GOBIN)
67
+ @ echo "-> Installing versionbump..."
68
+ @ go install github.com/crosseyed/versionbump/cmd/versionbump@$(VERSION_VERSIONBUMP)
Original file line number Diff line number Diff line change
1
+ ### Manage repository versions
2
+
3
+ ## Bump the major version for ecctl.
4
+ major: $(GOBIN)/versionbump
5
+ @ $(GOBIN)/versionbump -c major Makefile
6
+
7
+ ## Bump the minor o feature version for ecctl.
8
+ minor: $(GOBIN)/versionbump
9
+ @ $(GOBIN)/versionbump -c minor Makefile
10
+
11
+ ## Bump the patch o bugfix version for ecctl.
12
+ patch: $(GOBIN)/versionbump
13
+ @ $(GOBIN)/versionbump -c patch Makefile
You can’t perform that action at this time.
0 commit comments