Skip to content

Commit b10f810

Browse files
add get_tag script to set proper version
1 parent 3a8de22 commit b10f810

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
## [Unreleased]
1+
## [1.2.0] - 2020-05-20
22
### Added
33
- acp-authz plugin
44
- 'components' registry
55
- authnId to Cloudentity AuthnCtx
6+
- add get_tag script
67

78
## [1.1.0] - 2020-04-21
89
### Added

Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
CURRENT_VERSION ?= $(shell ./bin/get_version.sh)
2+
TAG ?= $(shell ./bin/get_tag.sh)
23

34
NO_COLOR = \x1b[0m
45
OK_COLOR = \x1b[32;01m
@@ -12,4 +13,4 @@ standalone:
1213

1314
docker: standalone
1415
@echo -e "$(OK_COLOR) > building docker $(NO_COLOR)"
15-
docker build -t cloudentity/pyron pyron-app --build-arg version=$(CURRENT_VERSION)
16+
docker build -t cloudentity/pyron:$(TAG) pyron-app --build-arg version=$(CURRENT_VERSION)

bin/get_tag.sh

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
set -ex
3+
4+
type=$(git branch | grep "\\*" | cut -d ' ' -f2 | cut -d '/' -f1)
5+
6+
if [ "$type" = "release" ] || [ "$type" = "hotfix" ] ; then
7+
git branch | grep "\\*" | cut -d ' ' -f2 | cut -d '/' -f2
8+
elif [ "$type" = "master" ]; then
9+
echo "master"
10+
elif git describe --contains 2> /dev/null; then
11+
exit 0
12+
else
13+
echo "latest"
14+
fi
15+

0 commit comments

Comments
 (0)