-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to static building to remove dependency to libgit2
- Loading branch information
Showing
9 changed files
with
76 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
: ${GOOS:=linux} | ||
: ${GOARCH:=amd64} | ||
: ${GO_TAGS:=static,system_libgit2} | ||
source ./env.sh | ||
|
||
COMMIT_HASH=$(git rev-parse --short HEAD 2>/dev/null) | ||
BUILD_DATE=$(date +%FT%T%z) | ||
VERSION=$(git tag | sort | tail -n 1) | ||
VERSION=${VERSION/v/}; | ||
echo --- Build letter-generator | ||
|
||
echo GO111MODULE=on CGO_ENABLED=1 go build --tags ${GO_TAGS} $* -ldflags "-w -s -X main.AppVersionNumber=${VERSION} -X main.CommitHash=${COMMIT_HASH} -X main.BuildDate=${BUILD_DATE}" -o dist/${GOOS}/${GOARCH}/lg ./cmd/lg | ||
GO111MODULE=on CGO_ENABLED=1 go build --tags ${GO_TAGS} $* -ldflags "-w -s -X main.AppVersionNumber=${VERSION} -X main.CommitHash=${COMMIT_HASH} -X main.BuildDate=${BUILD_DATE}" -o dist/${GOOS}/${GOARCH}/lg ./cmd/lg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
#!/bin/bash | ||
|
||
echo install libgit2 | ||
source ./env.sh | ||
|
||
echo --- Build static git2go | ||
|
||
git submodule update --init # get git2go | ||
cd ext_deps/git2go | ||
git checkout ${LIBGIT2_TAG} | ||
git submodule update --init # get libgit2 | ||
make install-static | ||
cd - | ||
|
||
echo | ||
echo --- Install dependencies | ||
echo go get -d -v ./... | ||
go get -d -v ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#!/usr/bin/env sh | ||
#!/usr/bin/env bash | ||
|
||
: ${GO_TAGS:=static,system_libgit2} | ||
source ./env.sh | ||
|
||
echo --- Test letter-generator | ||
go test --tags ${GO_TAGS} -v ./... $* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
: ${GOOS:=linux} | ||
: ${GOARCH:=amd64} | ||
: ${GO_TAGS:=static} | ||
: ${LIBGIT2_TAG:=release-1.1} | ||
|
||
: ${COMMIT_HASH:=$(git rev-parse --short HEAD 2>/dev/null)} | ||
: ${BUILD_DATE:=$(date +%FT%T%z)} | ||
: ${VERSION:=$(git tag | sort | tail -n 1)} | ||
: ${VERSION:=${VERSION/v/}} |
Submodule git2go
updated
75 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters