Skip to content

Commit 4de896b

Browse files
[AUTOPR] Automatic updates (#55)
* Update dependencies --------- Co-authored-by: nicolaasuni-vonage <[email protected]>
1 parent d4139c1 commit 4de896b

File tree

7 files changed

+90
-35
lines changed

7 files changed

+90
-35
lines changed

Makefile

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@ help:
2828
@echo "$(PROJECT) Makefile."
2929
@echo "The following commands are available:"
3030
@echo ""
31-
@echo " make c : Build and test the C version"
32-
@echo " make cgo : Build and test the GO C-wrapper version"
33-
@echo " make go : Build and test the GO version"
34-
@echo " make javascript : Build and test the Javascript version"
35-
@echo " make python : Build and test the Python version"
36-
@echo " make java : Build and test the Java version"
37-
@echo " make clean : Remove any build artifact"
38-
@echo " make tag : Tag the Git repository"
31+
@echo " make c : Build and test the C version"
32+
@echo " make cgo : Build and test the GO C-wrapper version"
33+
@echo " make go : Build and test the GO version"
34+
@echo " make javascript : Build and test the Javascript version"
35+
@echo " make python : Build and test the Python version"
36+
@echo " make java : Build and test the Java version"
37+
@echo " make clean : Remove any build artifact"
38+
@echo " make tag : Tag the Git repository"
39+
@echo " make versionup : Increase the patch number in the VERSION file"
3940
@echo ""
4041

4142
all: clean c cgo go java javascript python
@@ -85,3 +86,8 @@ clean:
8586
tag:
8687
git tag -a "v$(VERSION)" -m "Version $(VERSION)" && \
8788
git push origin --tags
89+
90+
# Increase the patch number in the VERSION file
91+
.PHONY: versionup
92+
versionup:
93+
echo ${VERSION} | gawk -F. '{printf("%d.%d.%d\n",$$1,$$2,(($$3+1)));}' > VERSION

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.6.18
1+
1.6.19

c/doc/Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ PROJECT_NAME = "NumKey"
3232
# This could be handy for archiving the generated documentation or
3333
# if some version control system is used.
3434

35-
PROJECT_NUMBER = 1.6.18
35+
PROJECT_NUMBER = 1.6.19
3636

3737
# Using the PROJECT_BRIEF tag one can provide an optional one line description
3838
# for a project that appears at the top of each page and should give viewer

cgo/Makefile

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,18 @@ help:
7272
@echo "GOPATH=$(GOPATH)"
7373
@echo "The following commands are available:"
7474
@echo ""
75-
@echo " make clean : Remove any build artifact"
76-
@echo " make coverage : Generate the coverage report"
77-
@echo " make deps : Get dependencies"
78-
@echo " make format : Format the source code"
79-
@echo " make linter : Check code against multiple linters"
80-
@echo " make mod : Download dependencies"
81-
@echo " make qa : Run all tests and static analysis tools"
82-
@echo " make test : Run unit tests"
75+
@echo " make clean : Remove any build artifact"
76+
@echo " make coverage : Generate the coverage report"
77+
@echo " make deps : Get dependencies"
78+
@echo " make format : Format the source code"
79+
@echo " make linter : Check code against multiple linters"
80+
@echo " make mod : Download dependencies"
81+
@echo " make qa : Run all tests and static analysis tools"
82+
@echo " make test : Run unit tests"
83+
@echo " make updateall : Update everything"
84+
@echo " make updatego : Update Go version"
85+
@echo " make updatelint : Update golangci-lint version"
86+
@echo " make updatemod : Update dependencies"
8387
@echo ""
8488
@echo "Use DEVMODE=LOCAL for human friendly output."
8589
@echo ""
@@ -160,3 +164,27 @@ test: ensuretarget
160164
-coverprofile=target/report/coverage.out \
161165
-v $(SRCDIR) $(TESTEXTRACMD)
162166
@echo -e "\n\n>>> END: Unit Tests <<<\n\n"
167+
168+
# Update everything
169+
.PHONY: updateall
170+
updateall: updatego updatelint updatemod
171+
172+
# Update go version
173+
.PHONY: updatego
174+
updatego:
175+
$(eval LAST_GO_TOOLCHAIN=$(shell curl -s https://go.dev/dl/ | grep -oP 'go[0-9]+\.[0-9]+\.[0-9]+\.linux-amd64\.tar\.gz' | head -n 1 | grep -oP 'go[0-9]+\.[0-9]+\.[0-9]+'))
176+
$(eval LAST_GO_VERSION=$(shell echo ${LAST_GO_TOOLCHAIN} | grep -oP '[0-9]+\.[0-9]+'))
177+
sed -i "s|^go [0-9]*\.[0-9]*$$|go ${LAST_GO_VERSION}|g" ../go.mod
178+
sed -i "s|^toolchain go[0-9]*\.[0-9]*\.[0-9]*$$|toolchain ${LAST_GO_TOOLCHAIN}|g" ../go.mod
179+
180+
# Update linter version
181+
.PHONY: updatelint
182+
updatelint:
183+
$(eval LAST_GOLANGCILINT_VERSION=$(shell curl -sL https://github.com/golangci/golangci-lint/releases/latest | grep -oP '<title>Release \Kv[0-9]+\.[0-9]+\.[0-9]+'))
184+
sed -i "s|^GOLANGCILINTVERSION=v[0-9]*\.[0-9]*\.[0-9]*$$|GOLANGCILINTVERSION=${LAST_GOLANGCILINT_VERSION}|g" Makefile
185+
186+
# Update dependencies
187+
.PHONY: updatemod
188+
updatemod:
189+
# $(GO) get $(shell $(GO) list -f '{{if not (or .Main .Indirect)}}{{.Path}}{{end}}' -m all)
190+
$(GO) get -t -u ./... && go mod tidy -compat=$(shell grep -oP 'go \K[0-9]+\.[0-9]+' ../go.mod)

go/Makefile

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,18 @@ help:
7272
@echo "GOPATH=$(GOPATH)"
7373
@echo "The following commands are available:"
7474
@echo ""
75-
@echo " make clean : Remove any build artifact"
76-
@echo " make coverage : Generate the coverage report"
77-
@echo " make deps : Get dependencies"
78-
@echo " make format : Format the source code"
79-
@echo " make linter : Check code against multiple linters"
80-
@echo " make mod : Download dependencies"
81-
@echo " make modupdate : Update dependencies"
82-
@echo " make qa : Run all tests and static analysis tools"
83-
@echo " make test : Run unit tests"
75+
@echo " make clean : Remove any build artifact"
76+
@echo " make coverage : Generate the coverage report"
77+
@echo " make deps : Get dependencies"
78+
@echo " make format : Format the source code"
79+
@echo " make linter : Check code against multiple linters"
80+
@echo " make mod : Download dependencies"
81+
@echo " make qa : Run all tests and static analysis tools"
82+
@echo " make test : Run unit tests"
83+
@echo " make updateall : Update everything"
84+
@echo " make updatego : Update Go version"
85+
@echo " make updatelint : Update golangci-lint version"
86+
@echo " make updatemod : Update dependencies"
8487
@echo ""
8588
@echo "Use DEVMODE=LOCAL for human friendly output."
8689
@echo ""
@@ -146,12 +149,6 @@ linter:
146149
mod:
147150
$(GO) mod download all
148151

149-
# Update dependencies
150-
.PHONY: modupdate
151-
modupdate:
152-
# $(GO) get $(shell $(GO) list -f '{{if not (or .Main .Indirect)}}{{.Path}}{{end}}' -m all)
153-
$(GO) get -t -u ./... && go mod tidy -compat=$(shell grep -oP 'go \K[0-9]+\.[0-9]+' ../go.mod)
154-
155152
# Run all tests and static analysis tools
156153
.PHONY: qa
157154
qa: test coverage linter
@@ -170,3 +167,27 @@ test: ensuretarget
170167
-coverprofile=$(TARGETDIR)/report/coverage.out \
171168
-v $(SRCDIR) $(TESTEXTRACMD)
172169
@echo -e "\n\n>>> END: Unit Tests <<<\n\n"
170+
171+
# Update everything
172+
.PHONY: updateall
173+
updateall: updatego updatelint updatemod
174+
175+
# Update go version
176+
.PHONY: updatego
177+
updatego:
178+
$(eval LAST_GO_TOOLCHAIN=$(shell curl -s https://go.dev/dl/ | grep -oP 'go[0-9]+\.[0-9]+\.[0-9]+\.linux-amd64\.tar\.gz' | head -n 1 | grep -oP 'go[0-9]+\.[0-9]+\.[0-9]+'))
179+
$(eval LAST_GO_VERSION=$(shell echo ${LAST_GO_TOOLCHAIN} | grep -oP '[0-9]+\.[0-9]+'))
180+
sed -i "s|^go [0-9]*\.[0-9]*$$|go ${LAST_GO_VERSION}|g" ../go.mod
181+
sed -i "s|^toolchain go[0-9]*\.[0-9]*\.[0-9]*$$|toolchain ${LAST_GO_TOOLCHAIN}|g" ../go.mod
182+
183+
# Update linter version
184+
.PHONY: updatelint
185+
updatelint:
186+
$(eval LAST_GOLANGCILINT_VERSION=$(shell curl -sL https://github.com/golangci/golangci-lint/releases/latest | grep -oP '<title>Release \Kv[0-9]+\.[0-9]+\.[0-9]+'))
187+
sed -i "s|^GOLANGCILINTVERSION=v[0-9]*\.[0-9]*\.[0-9]*$$|GOLANGCILINTVERSION=${LAST_GOLANGCILINT_VERSION}|g" Makefile
188+
189+
# Update dependencies
190+
.PHONY: updatemod
191+
updatemod:
192+
# $(GO) get $(shell $(GO) list -f '{{if not (or .Main .Indirect)}}{{.Path}}{{end}}' -m all)
193+
$(GO) get -t -u ./... && go mod tidy -compat=$(shell grep -oP 'go \K[0-9]+\.[0-9]+' ../go.mod)

java/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repositories {
1717
}
1818

1919
dependencies {
20-
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.0'
20+
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.1'
2121
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
2222
}
2323

python/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def run(self):
3030

3131
setup(
3232
name="numkey",
33-
version="1.6.18.1",
33+
version="1.6.19.1",
3434
keywords=("numkey E.164 shortcode lvn did encoding"),
3535
description="NumKey Bindings for Python",
3636
long_description=read("../README.md"),

0 commit comments

Comments
 (0)