Skip to content
Permalink
Browse files

add common helper

  • Loading branch information
batmany13 committed Aug 21, 2017
1 parent 20b3f98 commit cadbf1bc8f4dd2118b31a9ab768c681c8a5e8267
Showing with 30 additions and 0 deletions.
  1. +30 −0 sql/common/dbhelper
@@ -0,0 +1,30 @@
#!/usr/bin/make -f

export PATH := $(PATH):/opt/flyway

TEMPLATES = ../../templates

FLYWAY__PASSWORD=$(shell ansible-vault view secrets.json | jq -r .flyway.password)

TARGETS=flyway.conf

.PHONY: all
all: $(TARGETS)

flyway.conf: flyway.conf.in secrets.json
@sed \
-e's@{{password}}@$(FLYWAY__PASSWORD)@' \
$< > $@
chmod 600 $@

.PHONY: migrate
migrate: all
flyway migrate

.PHONY: info
info: all
flyway info

.PHONY: clean
clean:
$(RM) $(TARGETS)

0 comments on commit cadbf1b

Please sign in to comment.
You can’t perform that action at this time.