Skip to content

Commit a14bd6e

Browse files
author
ms
committed
AZ_RANDOM
1 parent 24f03f6 commit a14bd6e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ DOCKER_REPO := michalsw
66
APPNAME := redis-client
77

88
VERSION ?= $(shell git describe --tags --always)
9+
# if '.git/' doesn't exist
10+
# VERSION ?= $(shell git describe --tags --always 2>/dev/null || echo testdev)
911
BUILD_TIME ?= $(shell date -u '+%Y-%m-%d %H:%M:%S')
1012
LAST_COMMIT_USER ?= $(shell git log -1 --format='%cn <%ce>')
1113
LAST_COMMIT_HASH ?= $(shell git log -1 --format=%H)
@@ -21,7 +23,8 @@ DNS_NAME ?= localhost
2123

2224
AZ_RG ?= redisrg
2325
AZ_LOCATION ?= westeurope
24-
AZ_DNS_LABEL ?= $(APPNAME)-$(VERSION)
26+
AZ_RANDOM ?=$(shell head /dev/urandom | tr -dc a-z0-9 | head -c 7)
27+
AZ_DNS_LABEL ?= $(APPNAME)-$(AZ_RANDOM)
2528

2629
.DEFAULT_GOAL := help
2730
.PHONY: test go-run go-build all docker-build docker-run docker-stop azure-rg azure-rg-del azure-aci azure-aci-logs azure-vnet-create azure-redis-vnet azure-aci-delete

0 commit comments

Comments
 (0)