Skip to content

Commit

Permalink
Fixing really screwy version strings when you have some files modified
Browse files Browse the repository at this point in the history
  • Loading branch information
tgrogers committed Jun 19, 2019
1 parent f63324e commit 2d72b15
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions version_detection.mk
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ GPGPUSIM_VERSION=$(shell cat $(GPGPUSIM_ROOT)/version | awk '/Version/ {print $$

#Detect Git branch and commit #
GIT_COMMIT := $(shell git log -n 1 | head -1 | sed -re 's/commit (.*)/\1/')
GIT_FILES_CHANGED := $(shell git diff --numstat --cached && git diff --numstat | wc | sed -re 's/^\s+([0-9]+).*/\1/')
GPGPUSIM_BUILD := "gpgpu-sim_git-commit-$(GIT_COMMIT)_modified_$(GIT_FILES_CHANGED)"
GIT_FILES_CHANGED_A:=$(shell git diff --numstat | wc | sed -re 's/^\s+([0-9]+).*/\1./')
GIT_FILES_CHANGED:= $(GIT_FILES_CHANGED_A)$(shell git diff --numstat --cached | wc | sed -re 's/^\s+([0-9]+).*/\1/')
GPGPUSIM_BUILD := gpgpu-sim_git-commit-$(GIT_COMMIT)_modified_$(GIT_FILES_CHANGED)
endif

# Detect CUDA Runtime Version
Expand Down

0 comments on commit 2d72b15

Please sign in to comment.