Build openapi-is-current container
sketch
main() {
if [ ! developer-ran-build-after-changing-source ] ; then
echo "ERROR: bundles/openapi.yaml does not match src/"
echo "ERROR: Run bin/build.sh locally and commit and push the new bundled spec."
return 1
fi
}
developer-ran-build-after-changing-source() {
run-bundler
check-if-bundle-is-the-same-as-the-last-committed-bundle
}
run-bundler() {
bin/build.sh
}
check-if-bundle-is-the-same-as-the-last-committed-bundle() {
test -z "$(git diff bundles/openapi.yaml)"
}
main
Edited by Stoney Jackson