Skip to content

Instantly share code, notes, and snippets.

@seajoshc
Last active September 20, 2018 05:12
Show Gist options
  • Save seajoshc/00cf79624dffbf36ed7e0c3937bfb558 to your computer and use it in GitHub Desktop.
Save seajoshc/00cf79624dffbf36ed7e0c3937bfb558 to your computer and use it in GitHub Desktop.
Makefile - jq base64
.PHONY: all base64 update_schema
all: base64_encode update_schema
base64_encode: buildspec.yaml
$(eval base64_encoded := $(shell cat *.yaml | base64))
update_schema: schema.json
@cat *.json | jq --arg base64_buildspec $(base64_encoded) '.name=$$base64_buildspec'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment