Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env sh
# Usage:
# > to_deploy.sh <branch> <base_branch>
branch=${1:-HEAD}
base=${2:-"origin/master"}
declare -r mains=$(go list -json ./... | jq --compact-output '. | select(.Name == "main") | {ImportPath: .ImportPath, Deps: .Deps}')
declare -r changed=($(git diff --name-only ${base}...${branch} \