Created
March 6, 2022 07:08
-
-
Save otknoy/27e0b1526d64022a1ca49fa43561ff83 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
function cmd() { | |
branch=$(git branch --show-current) | |
out_dir=.output/${branch} | |
mkdir -p ${out_dir} | |
targets=("dev" "stg" "prod") | |
for target in ${targets[@]}; do | |
echo 'kustomize build' ${branch}/${target} > ${out_dir}/${target}.yaml | |
done | |
} | |
base_branch=main | |
current_branch=$(git branch --show-current) | |
git switch ${base_branch} | |
cmd | |
git switch ${current_branch} | |
cmd | |
diff <(cat .output/${base_branch}/*.yaml) <(cat .output/${current_branch}/*.yaml) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment