From bc620e8e5f60b5d7963731cda6d9ab24c945cd2e Mon Sep 17 00:00:00 2001 From: j Date: Thu, 16 Feb 2017 14:38:29 +0100 Subject: [PATCH] only run update if on master branch --- update.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/update.py b/update.py index 5a2abc86..fd37b9b1 100755 --- a/update.py +++ b/update.py @@ -231,6 +231,10 @@ if __name__ == "__main__": os.chdir(base) current = '' new = '' + if development: + if get('git', 'symbolic-ref', 'HEAD').split('/')[-1] != 'master': + print('update only possible if you are on master branch') + sys.exit(1) for repo in sorted(repos, key=lambda r: repos[r]['path']): path = os.path.join(base, repos[repo]['path']) if exists(path):