Skip to content

Commit d1d9c3c

Browse files
committed
Merge branch 'pm/build-persistent-https-with-recent-go' into maint
The build procedure for "git persistent-https" helper (in contrib/) has been updated so that it can be built with more recent versions of Go. * pm/build-persistent-https-with-recent-go: contrib/persistent-https: use Git version for build label contrib/persistent-https: update ldflags syntax for Go 1.7+
2 parents 366d2d5 + accb613 commit d1d9c3c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

contrib/persistent-https/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
BUILD_LABEL=$(shell date +"%s")
15+
BUILD_LABEL=$(shell cut -d" " -f3 ../../GIT-VERSION-FILE)
1616
TAR_OUT=$(shell go env GOOS)_$(shell go env GOARCH).tar.gz
1717

1818
all: git-remote-persistent-https git-remote-persistent-https--proxy \
@@ -25,8 +25,10 @@ git-remote-persistent-http: git-remote-persistent-https
2525
ln -f -s git-remote-persistent-https git-remote-persistent-http
2626

2727
git-remote-persistent-https:
28+
case $$(go version) in \
29+
"go version go"1.[0-5].*) EQ=" " ;; *) EQ="=" ;; esac && \
2830
go build -o git-remote-persistent-https \
29-
-ldflags "-X main._BUILD_EMBED_LABEL $(BUILD_LABEL)"
31+
-ldflags "-X main._BUILD_EMBED_LABEL$${EQ}$(BUILD_LABEL)"
3032

3133
clean:
3234
rm -f git-remote-persistent-http* *.tar.gz

0 commit comments

Comments
 (0)