Skip to content

Commit

Permalink
Add Makefile targets for udpates
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaasuni committed Oct 3, 2024
1 parent 4a84c03 commit 5113051
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 58 deletions.
25 changes: 16 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,16 @@ help:
@echo "VariantKey Makefile."
@echo "The following commands are available:"
@echo ""
@echo " make c : Build and test the C 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 python-class : Build and test the Python wrapper class"
@echo " make r : Build and test the R version"
@echo " make clean : Remove any build artifact"
@echo " make dbuild : Build everything inside a Docker container"
@echo " make tag : Tag the Git repository"
@echo " make c : Build and test the C 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 python-class : Build and test the Python wrapper class"
@echo " make r : Build and test the R version"
@echo " make clean : Remove any build artifact"
@echo " make dbuild : Build everything inside a Docker container"
@echo " make tag : Tag the Git repository"
@echo " make versionup : Increase the patch number in the VERSION file"
@echo ""

all: c go javascript python python-class r
Expand Down Expand Up @@ -147,3 +148,9 @@ pubdocs:
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",$$1,$$2,(($$3+1)));}' > VERSION
$(MAKE) version
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.6.18
5.6.19
24 changes: 12 additions & 12 deletions c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,18 @@ help:
@echo "$(PROJECT) Makefile."
@echo "The following commands are available:"
@echo ""
@echo " make qa : Run all the tests and static analysis reports"
@echo " make test : Run the unit tests"
@echo " make tidy : Check the code using clang-tidy"
@echo " make build : Build the library"
@echo " make version : Set version from VERSION file"
@echo " make doc : Generate source code documentation"
@echo " make format : Format the source code"
@echo " make clean : Remove any build artifact"
@echo " make install : Install the library"
@echo " make uninstall : Uninstall the library"
@echo " make rpm : Build an RPM package"
@echo " make deb : Build a DEB package"
@echo " make qa : Run all the tests and static analysis reports"
@echo " make test : Run the unit tests"
@echo " make tidy : Check the code using clang-tidy"
@echo " make build : Build the library"
@echo " make version : Set version from VERSION file"
@echo " make doc : Generate source code documentation"
@echo " make format : Format the source code"
@echo " make clean : Remove any build artifact"
@echo " make install : Install the library"
@echo " make uninstall : Uninstall the library"
@echo " make rpm : Build an RPM package"
@echo " make deb : Build a DEB package"
@echo ""

all: clean version format test tidy build rpm deb package_vk doc
Expand Down
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 = "VariantKey"
# This could be handy for archiving the generated documentation or
# if some version control system is used.

PROJECT_NUMBER = 5.6.18
PROJECT_NUMBER = 5.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
43 changes: 35 additions & 8 deletions go/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 @@ -159,3 +163,26 @@ 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 -t -u ./... && go mod tidy -compat=$(shell grep -oP 'go \K[0-9]+\.[0-9]+' ../go.mod)
8 changes: 4 additions & 4 deletions javascript/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ help:
@echo "Requires: node-js and uglify-js."
@echo "The following commands are available:"
@echo ""
@echo " make test : Run the unit tests against source code"
@echo " make build : Build and test a minified version of the library"
@echo " make format : Format the source code"
@echo " make clean : Remove any build artifact"
@echo " make test : Run the unit tests against source code"
@echo " make build : Build and test a minified version of the library"
@echo " make format : Format the source code"
@echo " make clean : Remove any build artifact"
@echo ""

all: clean format test build
Expand Down
14 changes: 7 additions & 7 deletions python-class/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ help:
@echo "${PROJECT} Python Makefile."
@echo "The following commands are available:"
@echo ""
@echo " make build : Build the library"
@echo " make clean : Remove any build artifact"
@echo " make docs : Generate documentation"
@echo " make format : Format the source code"
@echo " make test : Test the library"
@echo " make venv : Create a virtual environment"
@echo " make version : Set the version from VERSION file"
@echo " make build : Build the library"
@echo " make clean : Remove any build artifact"
@echo " make docs : Generate documentation"
@echo " make format : Format the source code"
@echo " make test : Test the library"
@echo " make venv : Create a virtual environment"
@echo " make version : Set the version from VERSION file"
@echo ""

all: clean venv build test
Expand Down
4 changes: 2 additions & 2 deletions python-class/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def run(self):

setup(
name="pyvariantkey",
version="5.6.18.0",
version="5.6.19.0",
keywords=("variantkey variant key genetic genomics"),
description="VariantKey Python wrapper class",
long_description=read("../README.md"),
Expand All @@ -56,7 +56,7 @@ def run(self):
],
install_requires=[
"numpy>=1.24.2,<2",
"variantkey>=5.6.18.0",
"variantkey>=5.6.19.0",
],
extras_require={
"test": [
Expand Down
14 changes: 7 additions & 7 deletions python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ help:
@echo "${PROJECT} Python Makefile."
@echo "The following commands are available:"
@echo ""
@echo " make build : Build the library"
@echo " make clean : Remove any build artifact"
@echo " make docs : Generate documentation"
@echo " make format : Format the source code"
@echo " make test : Test the library"
@echo " make venv : Create a virtual environment"
@echo " make version : Set the version from VERSION file"
@echo " make build : Build the library"
@echo " make clean : Remove any build artifact"
@echo " make docs : Generate documentation"
@echo " make format : Format the source code"
@echo " make test : Test the library"
@echo " make venv : Create a virtual environment"
@echo " make version : Set the version from VERSION file"
@echo ""

all: clean venv build test
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="variantkey",
version="5.6.18.0",
version="5.6.19.0",
keywords=("variantkey variant key genetic genomics"),
description="VariantKey Bindings for Python",
long_description=read("../README.md"),
Expand Down
10 changes: 5 additions & 5 deletions r/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ help:
@echo "VariantKey R Makefile."
@echo "The following commands are available:"
@echo ""
@echo " make build : Build the library"
@echo " make test : Test the library"
@echo " make format : Format the source code"
@echo " make clean : Remove any build artifact"
@echo " make devdoc : Generate documentation"
@echo " make build : Build the library"
@echo " make test : Test the library"
@echo " make format : Format the source code"
@echo " make clean : Remove any build artifact"
@echo " make devdoc : Generate documentation"
@echo ""

all: clean format build test
Expand Down
2 changes: 1 addition & 1 deletion r/variantkey/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: variantkey
Title: Genetic VariantKey
Version: 5.6.18.0
Version: 5.6.19.0
Authors@R: person("Nicola", "Asuni", email = "[email protected]", role = c("aut", "cre"))
Description: Tools to generate and process a 64 bit Unsigned Integer Keys for Human Genetic Variants.
The VariantKey is sortable for chromosome and position,
Expand Down

0 comments on commit 5113051

Please sign in to comment.