Skip to content

Commit

Permalink
Improve build automation
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaasuni-vonage committed Feb 15, 2023
1 parent a90ddcf commit 0246dab
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 22 deletions.
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@
SHELL=/bin/bash
.SHELLFLAGS=-o pipefail -c

# Project owner
OWNER=Vonage

# Project vendor
VENDOR=Vonage
VENDOR=${OWNER}

# Lowercase VENDOR name for Docker
LCVENDOR=$(shell echo "${VENDOR}" | tr '[:upper:]' '[:lower:]')

# CVS path (path to the parent dir containing the project)
CVSPATH=github.com/${VENDOR}
Expand Down Expand Up @@ -48,7 +54,7 @@ help:
@echo " make tag : Tag the Git repository"
@echo ""

all: clean c cgo go javascript python
all: clean c cgo go java javascript python

# Build and test the C version
.PHONY: c
Expand Down Expand Up @@ -97,7 +103,7 @@ dbuild:
@mkdir -p $(TARGETDIR)
@rm -rf $(TARGETDIR)/*
@echo 0 > $(TARGETDIR)/make.exit
CVSPATH=$(CVSPATH) VENDOR=$(VENDOR) PROJECT=$(PROJECT) MAKETARGET='$(MAKETARGET)' $(CURRENTDIR)/dockerbuild.sh
CVSPATH=$(CVSPATH) VENDOR=$(LCVENDOR) PROJECT=$(PROJECT) MAKETARGET='$(MAKETARGET)' $(CURRENTDIR)/dockerbuild.sh
@exit `cat $(TARGETDIR)/make.exit`

# Publish Documentation in GitHub (requires writing permissions)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.3
1.5.5
15 changes: 9 additions & 6 deletions c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@
SHELL=/bin/bash
.SHELLFLAGS=-o pipefail -c

# CVS path (path to the parent dir containing the project)
CVSPATH=github.com/vonage

# Project owner
OWNER=vonage
OWNER=Vonage

# Project vendor
VENDOR=vonage
VENDOR=${OWNER}

# Lowercase VENDOR name for Docker
LCVENDOR=$(shell echo "${VENDOR}" | tr '[:upper:]' '[:lower:]')

# CVS path (path to the parent dir containing the project)
CVSPATH=github.com/${VENDOR}

# Project name
PROJECT=numkey
Expand All @@ -29,7 +32,7 @@ RELEASE=$(shell cat ../RELEASE)
CURRENTDIR=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))

# Name of RPM or DEB package
PKGNAME=${VENDOR}-${PROJECT}-headers
PKGNAME=${LCVENDOR}-${PROJECT}-headers

# Path for binary files (where the executable files will be installed)
LIBPATH=usr/include/$(VENDOR)/$(PROJECT)/
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 = "NumKey"
# This could be handy for archiving the generated documentation or
# if some version control system is used.

PROJECT_NUMBER = 1.5.3
PROJECT_NUMBER = 1.5.5

# 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
14 changes: 10 additions & 4 deletions cgo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@
SHELL=/bin/bash
.SHELLFLAGS=-o pipefail -c

# CVS path (path to the parent dir containing the project)
CVSPATH=github.com/vonage
# Project owner
OWNER=Vonage

# Project vendor
VENDOR=vonage
VENDOR=${OWNER}

# Lowercase VENDOR name for Docker
LCVENDOR=$(shell echo "${VENDOR}" | tr '[:upper:]' '[:lower:]')

# CVS path (path to the parent dir containing the project)
CVSPATH=github.com/${VENDOR}

# Project name
PROJECT=numkey
Expand All @@ -23,7 +29,7 @@ VERSION=$(shell cat ../VERSION)
RELEASE=$(shell cat ../RELEASE)

# Name of RPM or DEB package
PKGNAME=${VENDOR}-${PROJECT}
PKGNAME=${LCVENDOR}-${PROJECT}

# Current directory
CURRENTDIR=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
Expand Down
5 changes: 3 additions & 2 deletions dockerbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ set -e -u +x
: ${CVSPATH:=project}
: ${VENDOR:=vendor}
: ${PROJECT:=project}
: ${SSH_PRIVATE_KEY:=$(cat ~/.ssh/id_rsa)}
: ${SSH_PUBLIC_KEY:=$(cat ~/.ssh/id_rsa.pub)}
: ${SSH_PRIVATE_KEY:=$(cat ~/.ssh/id_rsa || cat ~/.ssh/id_ed25519)}
: ${SSH_PUBLIC_KEY:=$(cat ~/.ssh/id_rsa.pub || cat ~/.ssh/id_ed25519.pub)}

# make target to execute
: ${MAKETARGET:=all}
Expand All @@ -38,6 +38,7 @@ PRJPATH=/root/src/${CVSPATH}/${PROJECT}
# so in case of error we can continue without interrupting this script.
cat > Dockerfile.test <<- EOM
FROM ${DOCKERDEV}
ENV PATH=/usr/local/go/bin:$PATH
ARG SSH_PRIVATE_KEY=""
ARG SSH_PUBLIC_KEY=""
RUN \\
Expand Down
14 changes: 10 additions & 4 deletions go/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@
SHELL=/bin/bash
.SHELLFLAGS=-o pipefail -c

# CVS path (path to the parent dir containing the project)
CVSPATH=github.com/vonage
# Project owner
OWNER=Vonage

# Project vendor
VENDOR=vonage
VENDOR=${OWNER}

# Lowercase VENDOR name for Docker
LCVENDOR=$(shell echo "${VENDOR}" | tr '[:upper:]' '[:lower:]')

# CVS path (path to the parent dir containing the project)
CVSPATH=github.com/${VENDOR}

# Project name
PROJECT=numkey
Expand All @@ -23,7 +29,7 @@ VERSION=$(shell cat ../VERSION)
RELEASE=$(shell cat ../RELEASE)

# Name of RPM or DEB package
PKGNAME=${VENDOR}-${PROJECT}
PKGNAME=${LCVENDOR}-${PROJECT}

# Current directory
CURRENTDIR=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
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.5.3.1",
version="1.5.5.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 0246dab

Please sign in to comment.