1.0.2 • Published 7 years ago
promise-for-git v1.0.2
git-promise
Add commands to run as branches merge down stream.
promise new <promise> <extension>
promise new tables sqlpromise add <promise> <command>
mysql "ALTER TABLE table ADD some_column int"
promise add tables ALTER TABLE table ADD some_column intpromise pull <promise>
promise pull tables
mysql "source tables.sql"promise resolve <promise>
promise resolve tablesExample
# Create promise for SQL
promise new tables sqlDev server 1
# Add a line to our promise
promise add tables ALTER TABLE table ADD some_column int
# Push changes
git add -A && git commit && git pushDev server 2
# Add a line to our promise
promise add tables ALTER TABLE table ADD some_column_other_column VARCHAR(32)
# Push changes
git add -A && git commit && git pushTest / Master server
# Pull changes
git pull
promise pull tables
cat tables.sql
# ALTER TABLE table ADD some_column int
# ALTER TABLE table ADD some_column_other_column VARCHAR(32)
# Apply changes
mysql "source tables.sql"
# Resolve changes
promise resolve tables
cat tables.sql # EmptyPull and resolve should always be used together, in one sitting.
promise pull
do_something
promise resolvepromise add will overwrite the cache and should be done after promise pull.