Giter Site home page Giter Site logo

garex / git-migrate Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 12 KB

Execute commands from shell file, storing last successful execution in detached git branch.

Home Page: https://pypi.python.org/pypi/git-migrate

License: MIT License

Shell 1.10% Python 98.90%

git-migrate's Introduction

Git migrate

Execute commands from shell file, storing last successful execution in detached git branch.

How it works

You have some bash file(-s) with few commands inside. Each on it's own line. If you will run it in shell -- it will execute all of them.

During deploy you need to run only new commands, that was added to this file. Think of it as a one way DB migrations that will get commands to execute from git diff.

Git to the resque! System will store successfull commands executions in detached branch named .gitmigrate. Then if we will have 5 commands and only 3 of them was successful, on next run we will not run them.

Always run/include some code?

First lines until two new lines will be always executed. So when you have shebang and then 2 new lines (as it usual) -- it will be executed. Also you can add some includes after your 1st line, that will allow you to have DSL-like functions inside your script. After which you shoudl have two new lines.

Conventions and configurations

Configuration values are in file .gitmigrate.

Configuration values with defaults

See .gitmigrate.dist as an example

  • Detached branch name _gitmigrate.
  • Path to command file(s) is .gitmigrate.*. It could be both .gitmigrate.sh or .gitmigrate.py or .gitmigrate.d/ directory.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.