Browse Source

Track untracked files

Stephen McQuay 1 year ago
parent
commit
49efd7dc1a
Signed by: Stephen McQuay (smcquay) <stephen@mcquay.me> GPG Key ID: C383C74875475AC8
1 changed files with 4 additions and 3 deletions
  1. 4
    3
      Makefile

+ 4
- 3
Makefile View File

@@ -5,6 +5,7 @@ VERSION := $(shell git describe --tags 2> /dev/null || echo "unreleased")
5 5
 V_DIRTY := $(shell git describe --exact-match HEAD 2> /dev/null > /dev/null || echo "-unreleased")
6 6
 GIT     := $(shell git rev-parse --short HEAD)
7 7
 DIRTY   := $(shell git diff-index --quiet HEAD 2> /dev/null > /dev/null || echo "-dirty")
8
+UNTRK   := $(shell git ls-files --other --exclude-standard --directory | grep . > /dev/null && echo "-untracked-files")
8 9
 
9 10
 bin/hw: vendor $(shell ls *.go) cmd/hw/main.go bin
10 11
 	@echo hw
@@ -44,9 +45,9 @@ lint:
44 45
 
45 46
 .PHONY: docker-build
46 47
 docker-build: bin/hw bin/hwc bin/hwl
47
-	docker build -f cmd/hw/Dockerfile  . -t  smcquay/hw:$(VERSION)$(V_DIRTY)$(DIRTY)
48
-	docker build -f cmd/hwc/Dockerfile . -t smcquay/hwc:$(VERSION)$(V_DIRTY)$(DIRTY)
49
-	docker build -f cmd/hwl/Dockerfile . -t smcquay/hwl:$(VERSION)$(V_DIRTY)$(DIRTY)
48
+	docker build -f cmd/hw/Dockerfile  . -t  smcquay/hw:$(VERSION)$(V_DIRTY)$(DIRTY)$(UNTRK)
49
+	docker build -f cmd/hwc/Dockerfile . -t smcquay/hwc:$(VERSION)$(V_DIRTY)$(DIRTY)$(UNTRK)
50
+	docker build -f cmd/hwl/Dockerfile . -t smcquay/hwl:$(VERSION)$(V_DIRTY)$(DIRTY)$(UNTRK)
50 51
 
51 52
 .PHONY: docker-push
52 53
 docker-push:

Loading…
Cancel
Save