Giter Site home page Giter Site logo

kolbasa / git-repo-watcher Goto Github PK

View Code? Open in Web Editor NEW
170.0 10.0 34.0 41 KB

A simple bash script to watch a git repository and pull upstream changes if needed.

License: MIT License

Shell 100.00%
repo watcher repository sync daemon pull shell bash notify remote

git-repo-watcher's People

Contributors

kolbasa avatar ngarindungu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

git-repo-watcher's Issues

change_pulled hook not being called

I'm seeing errors when the script pulls changes;

./git-repo-watcher: eval: line 92: unexpected EOF while looking for matching `''
./git-repo-watcher: eval: line 93: syntax error: unexpected end of file

Run against these versions of bash;

GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin17)
Copyright (C) 2007 Free Software Foundation, Inc.

and

GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2016 Free Software Foundation, Inc.

with the second being inside a docker container.

Disable endless loop check

Hey, added some IF statements to add feature if I do "-i 0" it will run just once. Which is great for run it through cron once in a while and not "endlessly".
Would be cool if it had from start, otherwise it's perfect, THANKS

push to another repo

Well I know if I request this, it;s not match with the name of this script ๐Ÿ˜ƒ
But, please consider to add a function to push to another repo.
The purpose is I wanted to create a backup repo, so everytime there's a change on a repo, after a pull, it will push to another repo.
Thanks.

Edit: Hmm looks like it can be done using hooks ๐Ÿ˜„ but how to do:
git pull origin master, then:
git push backup master

Bad Substitution at line 114

Fantastic! However, I got errors when pulling changes:
./git-repo-watcher: line 114: ${commit_message@Q}: bad substitution

Version of bash:
GNU bash, version 4.2.46(2)-release (x86_64-koji-linux-gnu) Copyright (C) 2011 Free Software Foundation, Inc.

Solution: Update bash version to at least v4.4 or get rid of the echo line printing the commit message

Keep it up!!!

does it support windows?

I can see the directory path is prefixed by "/" by default
If we can get the environment os and prepend if in Linux or Mac would be supported?

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.