#!/usr/bin/env bash

# please use git bash on windows

COMMITID=$(git show -s --format=%H)
BRANCH=$(git branch --show-current)
GOVERSION=$(go version)
BUILDTIME=$(date +"%Y-%m-%d %H:%M:%S %z")

go build -tags purego -ldflags "-X 'main.gitCommit=$COMMITID' -X 'main.gitBranch=$BRANCH' -X 'main.buildTime=$BUILDTIME' -X 'main.goVersion=$GOVERSION'"
