diff --git a/Makefile b/Makefile index 1880968..cb2e422 100644 --- a/Makefile +++ b/Makefile @@ -5,24 +5,27 @@ help: repo=yardstick project=braid -tag=$(shell git rev-parse --short=7 HEAD) branch=$(shell git rev-parse --abbrev-ref HEAD) -version=$(shell git describe --exact-match --tags $(git log -n1 --pretty='%h')) - - -full: build push ## build the docker container completely +tag=$(shell echo $(branch) | grep -Eo 'feature/([A-Za-z]+-[0-9]*)' | grep -Eo '[A-Za-z]+-[0-9]*' || \ + echo $(branch) | grep -Eo '(release|hotfix)/[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+' | grep -Eo '[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+' || \ + echo $(branch) | grep -Eo 'YASDEV-([[:digit:]]*)') +full: build push build: ## build the production dockerfile - docker build -t $(repo)/$(project):$(tag) \ - -t $(repo)/$(project):$(branch) \ - . - if git describe --exact-match --tags $(shell git log -n1 --pretty='%h'); then \ - docker tag $(repo)/$(project):$(tag) $(repo)/$(project):$(version); \ - fi + @if [[ -n "$(tag)" ]]; then \ + echo "$(tag)" > docker_tag.txt; \ + docker build -t $(repo)/$(project):$(tag) .; \ + else \ + echo "Nothing to build."; \ + fi push: ## push the production dockerfile - docker push $(repo)/$(project):$(tag) - docker push $(repo)/$(project):$(branch) - if git describe --exact-match --tags $(shell git log -n1 --pretty='%h'); then \ - docker push $(repo)/$(project):$(version); \ - fi \ No newline at end of file + @if [[ -n "$(tag)" ]]; then \ + docker push $(repo)/$(project):$(tag); \ + else \ + echo "Nothing to push."; \ + fi + +display: ## display the tag/branch values for development testing + @echo "branch: $(branch)" + @echo "tag: $(tag)" \ No newline at end of file diff --git a/README.md b/README.md index e9bdd90..77c8bc3 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# BRAID v1.2.2 +# BRAID v1.2.3 > Websocket server for the Measure platform [![Build Status](https://semaphoreci.com/api/v1/projects/7767f0f3-4da6-4c84-9167-4db5402a3262/2573412/badge.svg)](https://semaphoreci.com/yardstick/braid) diff --git a/docker_tag.txt b/docker_tag.txt new file mode 100644 index 0000000..0495c4a --- /dev/null +++ b/docker_tag.txt @@ -0,0 +1 @@ +1.2.3 diff --git a/package-lock.json b/package-lock.json index 9837857..0f93e1b 100755 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "braid", - "version": "1.2.2", + "version": "1.2.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/config/app.ts b/src/config/app.ts index 5cb5f8f..5887065 100644 --- a/src/config/app.ts +++ b/src/config/app.ts @@ -1,5 +1,5 @@ module.exports = { - version : '1.2.2', + version : '1.2.3', whitelist : (process.env.WHITELIST || 'http://admin.localhost').split(','), secret : process.env.SECRET || 'test', devToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImNsaWVudCI6InRlc3QiLCJjbGllbnRfdHlwZSI6InNpdGUiLCJ1c2VyX3R5cGUiOiJ1c2VyIiwidXNlcl9pZCI6MjAwLCJjaGFubmVsIjoidGVzdF9jaGFubmVsIn0sImF1ZCI6ImludGVybmFsIiwiaXNzIjoiWWFyZHN0aWNrIFNvZnR3YXJlIiwic3ViIjoiQnJhaWQgSldUIn0.5KNCov_EW1cycT4Ay0oSvk4Z4PHFedd3bWOyqkHHTBQ',