#!/usr/bin/env sh

set -ex
export "BUILDMODE"="-buildmode=pie"
export "BUILDTAGS"="seccomp urfave_cli_no_docs"
export "CGO_ENABLED"="1"
export "GIT_COMMIT"="491b69bab9fa206b984fb26ba07d3110d62e671f"
export "GOEXPERIMENT"="nosystemcrypto"
export "REVISION"="15"

(
cd runc

LDFLAGS="-X main.gitCommit=${GIT_COMMIT} -X main.extraVersion=-${REVISION}"
go build -mod=vendor -trimpath -tags "${BUILDTAGS}" -ldflags "${LDFLAGS}" -o runc .
make man

)
