#!/usr/bin/env sh

set -ex
export "BUILDMODE"="-buildmode=pie"
export "BUILDTAGS"="seccomp urfave_cli_no_docs"
export "CGO_ENABLED"="1"
export "GIT_COMMIT"="8f2685a471d3347a686ad3909783d8aafc6bb208"
export "GOEXPERIMENT"="nosystemcrypto"
export "REVISION"="9"

(
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

)
