Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ COPY Makefile ./
COPY Makefile.azure ./
COPY Makefile.citus ./
COPY ./src/ ./src
COPY ./src/bin/pg_autoctl/git-version.h ./src/bin/pg_autoctl/git-version.h
RUN make -s clean && make -s install -j8


Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,16 @@ TOP := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
# Get pg_auto_failover version from header file
VERSION_FILE = src/bin/pg_autoctl/git-version.h
ifeq ("$(wildcard $(VERSION_FILE))","")
ifneq ("$(wildcard .git)","")
DUMMY := $(shell git update-index -q --refresh)
GIT_DIRTY := $(shell test -z "`git diff-index --name-only HEAD --`" || echo "-dirty")
GIT_VVERSION := $(shell git describe --match "v[0-9]*" HEAD 2>/dev/null)
GIT_DVERSION := $(shell echo $(GIT_VVERSION) | awk -Fv '{print $$2"$(GIT_DIRTY)"}')
GIT_VERSION := $(shell echo $(GIT_DVERSION) | sed -e 's/-/./g')
else
GIT_VERSION := unknown
endif
else
GIT_VERSION := $(shell awk -F '[ "]' '{print $$4}' $(VERSION_FILE))
endif

Expand Down
Loading