Skip to content

Commit f906465

Browse files
committed
rework check if a run of 'go-bindata' is necessary
* 'git diff' doesn't list new files, but 'git status -s'. * one uncommitted change in 'webapp/' triggers always a 'go-bindata' run. so we also include the timestamp in the check. * only timestamp based check is not usable, because on a fresh git checkout, the timestamps are updated.
1 parent dcffc08 commit f906465

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ sub git_describe {
161161
sub gen_bindata {
162162

163163
# only regenerate 'bindata.go' if something under 'webapp/' has changed
164-
if((! -e "bindata.go") || qx{git diff webapp} ne ""){
164+
if((! -e "bindata.go") || qx{git status -s webapp} && qx{find webapp/ -newer bindata.go}){
165165
# validate that 'go-bindata' is installed
166166
system("go-bindata -version > /dev/null 2>&1") == 0 or (sub {
167167
say "'go-bindata' missing! - please install per: 'go get -u github.com/jteeuwen/go-bindata/...'";

0 commit comments

Comments
 (0)