This setup is for a go project that produces a binary (it's not suitable for publishing a library).
The first person to set it up needs gb
installed globalally (see go get github.com/constabulary/gb/...
).
# Install GB globally:
go get github.com/constabulary/gb/...
# Start a git dir
git init .
# Create output directories
mkdir -p src vendor/src pkg bin
# Ignore temporary and secret files:
echo 'pkg' >> .gitignore
echo 'bin' >> .gitignore
echo '.env.secret' >> .gitignore
# Put the env and make files in place
wget -O Makefile "https://gist.githubusercontent.com/DanielHeath/fca874047e9fc2c0ffddecc5676de9f0/raw/a9c8af8f66d5d3d7bf493ef760524055aaa71501/Makefile"
wget -O .env "https://gist.githubusercontent.com/DanielHeath/fca874047e9fc2c0ffddecc5676de9f0/raw/a9c8af8f66d5d3d7bf493ef760524055aaa71501/.env"
# Use your global copy of gb to create a vendored copy of gb
gb vendor fetch github.com/constabulary/gb
make bin/gb
# Commit
git init .
git add .
git commit -m "Initial setup"
N.B.
When