Skip to content

Commit

Permalink
[AUTOPR] Automatic updates (#55)
Browse files Browse the repository at this point in the history
* Update dependencies

---------

Co-authored-by: nicolaasuni-vonage <[email protected]>
  • Loading branch information
github-actions[bot] and nicolaasuni-vonage authored Oct 3, 2024
1 parent d4139c1 commit 4de896b
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 35 deletions.
22 changes: 14 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ help:
@echo "$(PROJECT) Makefile."
@echo "The following commands are available:"
@echo ""
@echo " make c : Build and test the C version"
@echo " make cgo : Build and test the GO C-wrapper version"
@echo " make go : Build and test the GO version"
@echo " make javascript : Build and test the Javascript version"
@echo " make python : Build and test the Python version"
@echo " make java : Build and test the Java version"
@echo " make clean : Remove any build artifact"
@echo " make tag : Tag the Git repository"
@echo " make c : Build and test the C version"
@echo " make cgo : Build and test the GO C-wrapper version"
@echo " make go : Build and test the GO version"
@echo " make javascript : Build and test the Javascript version"
@echo " make python : Build and test the Python version"
@echo " make java : Build and test the Java version"
@echo " make clean : Remove any build artifact"
@echo " make tag : Tag the Git repository"
@echo " make versionup : Increase the patch number in the VERSION file"
@echo ""

all: clean c cgo go java javascript python
Expand Down Expand Up @@ -85,3 +86,8 @@ clean:
tag:
git tag -a "v$(VERSION)" -m "Version $(VERSION)" && \
git push origin --tags

# Increase the patch number in the VERSION file
.PHONY: versionup
versionup:
echo ${VERSION} | gawk -F. '{printf("%d.%d.%d\n",$$1,$$2,(($$3+1)));}' > VERSION
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.18
1.6.19
2 changes: 1 addition & 1 deletion c/doc/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ PROJECT_NAME = "NumKey"
# This could be handy for archiving the generated documentation or
# if some version control system is used.

PROJECT_NUMBER = 1.6.18
PROJECT_NUMBER = 1.6.19

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer
Expand Down
44 changes: 36 additions & 8 deletions cgo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,18 @@ help:
@echo "GOPATH=$(GOPATH)"
@echo "The following commands are available:"
@echo ""
@echo " make clean : Remove any build artifact"
@echo " make coverage : Generate the coverage report"
@echo " make deps : Get dependencies"
@echo " make format : Format the source code"
@echo " make linter : Check code against multiple linters"
@echo " make mod : Download dependencies"
@echo " make qa : Run all tests and static analysis tools"
@echo " make test : Run unit tests"
@echo " make clean : Remove any build artifact"
@echo " make coverage : Generate the coverage report"
@echo " make deps : Get dependencies"
@echo " make format : Format the source code"
@echo " make linter : Check code against multiple linters"
@echo " make mod : Download dependencies"
@echo " make qa : Run all tests and static analysis tools"
@echo " make test : Run unit tests"
@echo " make updateall : Update everything"
@echo " make updatego : Update Go version"
@echo " make updatelint : Update golangci-lint version"
@echo " make updatemod : Update dependencies"
@echo ""
@echo "Use DEVMODE=LOCAL for human friendly output."
@echo ""
Expand Down Expand Up @@ -160,3 +164,27 @@ test: ensuretarget
-coverprofile=target/report/coverage.out \
-v $(SRCDIR) $(TESTEXTRACMD)
@echo -e "\n\n>>> END: Unit Tests <<<\n\n"

# Update everything
.PHONY: updateall
updateall: updatego updatelint updatemod

# Update go version
.PHONY: updatego
updatego:
$(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]+'))
$(eval LAST_GO_VERSION=$(shell echo ${LAST_GO_TOOLCHAIN} | grep -oP '[0-9]+\.[0-9]+'))
sed -i "s|^go [0-9]*\.[0-9]*$$|go ${LAST_GO_VERSION}|g" ../go.mod
sed -i "s|^toolchain go[0-9]*\.[0-9]*\.[0-9]*$$|toolchain ${LAST_GO_TOOLCHAIN}|g" ../go.mod

# Update linter version
.PHONY: updatelint
updatelint:
$(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]+'))
sed -i "s|^GOLANGCILINTVERSION=v[0-9]*\.[0-9]*\.[0-9]*$$|GOLANGCILINTVERSION=${LAST_GOLANGCILINT_VERSION}|g" Makefile

# Update dependencies
.PHONY: updatemod
updatemod:
# $(GO) get $(shell $(GO) list -f '{{if not (or .Main .Indirect)}}{{.Path}}{{end}}' -m all)
$(GO) get -t -u ./... && go mod tidy -compat=$(shell grep -oP 'go \K[0-9]+\.[0-9]+' ../go.mod)
51 changes: 36 additions & 15 deletions go/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,18 @@ help:
@echo "GOPATH=$(GOPATH)"
@echo "The following commands are available:"
@echo ""
@echo " make clean : Remove any build artifact"
@echo " make coverage : Generate the coverage report"
@echo " make deps : Get dependencies"
@echo " make format : Format the source code"
@echo " make linter : Check code against multiple linters"
@echo " make mod : Download dependencies"
@echo " make modupdate : Update dependencies"
@echo " make qa : Run all tests and static analysis tools"
@echo " make test : Run unit tests"
@echo " make clean : Remove any build artifact"
@echo " make coverage : Generate the coverage report"
@echo " make deps : Get dependencies"
@echo " make format : Format the source code"
@echo " make linter : Check code against multiple linters"
@echo " make mod : Download dependencies"
@echo " make qa : Run all tests and static analysis tools"
@echo " make test : Run unit tests"
@echo " make updateall : Update everything"
@echo " make updatego : Update Go version"
@echo " make updatelint : Update golangci-lint version"
@echo " make updatemod : Update dependencies"
@echo ""
@echo "Use DEVMODE=LOCAL for human friendly output."
@echo ""
Expand Down Expand Up @@ -146,12 +149,6 @@ linter:
mod:
$(GO) mod download all

# Update dependencies
.PHONY: modupdate
modupdate:
# $(GO) get $(shell $(GO) list -f '{{if not (or .Main .Indirect)}}{{.Path}}{{end}}' -m all)
$(GO) get -t -u ./... && go mod tidy -compat=$(shell grep -oP 'go \K[0-9]+\.[0-9]+' ../go.mod)

# Run all tests and static analysis tools
.PHONY: qa
qa: test coverage linter
Expand All @@ -170,3 +167,27 @@ test: ensuretarget
-coverprofile=$(TARGETDIR)/report/coverage.out \
-v $(SRCDIR) $(TESTEXTRACMD)
@echo -e "\n\n>>> END: Unit Tests <<<\n\n"

# Update everything
.PHONY: updateall
updateall: updatego updatelint updatemod

# Update go version
.PHONY: updatego
updatego:
$(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]+'))
$(eval LAST_GO_VERSION=$(shell echo ${LAST_GO_TOOLCHAIN} | grep -oP '[0-9]+\.[0-9]+'))
sed -i "s|^go [0-9]*\.[0-9]*$$|go ${LAST_GO_VERSION}|g" ../go.mod
sed -i "s|^toolchain go[0-9]*\.[0-9]*\.[0-9]*$$|toolchain ${LAST_GO_TOOLCHAIN}|g" ../go.mod

# Update linter version
.PHONY: updatelint
updatelint:
$(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]+'))
sed -i "s|^GOLANGCILINTVERSION=v[0-9]*\.[0-9]*\.[0-9]*$$|GOLANGCILINTVERSION=${LAST_GOLANGCILINT_VERSION}|g" Makefile

# Update dependencies
.PHONY: updatemod
updatemod:
# $(GO) get $(shell $(GO) list -f '{{if not (or .Main .Indirect)}}{{.Path}}{{end}}' -m all)
$(GO) get -t -u ./... && go mod tidy -compat=$(shell grep -oP 'go \K[0-9]+\.[0-9]+' ../go.mod)
2 changes: 1 addition & 1 deletion java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repositories {
}

dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.0'
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.1'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

Expand Down
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def run(self):

setup(
name="numkey",
version="1.6.18.1",
version="1.6.19.1",
keywords=("numkey E.164 shortcode lvn did encoding"),
description="NumKey Bindings for Python",
long_description=read("../README.md"),
Expand Down

0 comments on commit 4de896b

Please sign in to comment.