git-lfs/script/bootstrap
Sebastian Schuberth a759a2fd05 Use goversioninfo instead of windres to embed Windows resources
windres is not always present whereas goversioninfo is easy to install.

This also fixes the generation of resource.syso to be part of the
standard build script instead of only the AppVeyor CI build.

Finally, adapt update-version.sh to patch versioninfo.json.
2016-12-15 12:27:47 +01:00

28 lines
795 B
Bash
Executable File

#!/usr/bin/env bash
set -e
if uname -s | grep -q "_NT-"; then
# Tell Cygwin / MSYS to really create symbolic links.
export CYGWIN="$CYGWIN winsymlinks:nativestrict"
export MSYS="$MSYS winsymlinks:nativestrict"
fi
if [ -z "$GOPATH" ]; then
export GOPATH="$(pwd)"
mkdir -p src/github.com/git-lfs
[ -h src/github.com/git-lfs/git-lfs ] ||
ln -s "$GOPATH" src/github.com/git-lfs/git-lfs
fi
if uname -s | grep -q "_NT-"; then
echo "Installing goversioninfo to embed resources into Windows executables..."
go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo
export PATH=$PATH:$GOPATH/bin/windows_386
echo "Creating the resource.syso version information file..."
go generate
fi
script/fmt
rm -rf bin/*
GO15VENDOREXPERIMENT=1 go run script/*.go -cmd build "$@"