From a1d5cbf0a5f874cbda28a4197bcc0f5bcb5ceb18 Mon Sep 17 00:00:00 2001 From: Jannik Vogel Date: Fri, 25 Nov 2016 20:22:34 +0100 Subject: [PATCH] Don't auto-update --- README.md | 6 ++---- tag_build.py | 11 ----------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 5d9e5c9..d41016b 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Pull requests to fix issues with the bot are more than welcome. ## What does it do? -After doing the self-update, the bot will clone the latest `MAIN_REPO` and resync `PUSH_REPO`/master. +The bot will clone the latest `MAIN_REPO` and resync `PUSH_REPO`/master. After that, each of the `PULL_REPOS` is visited. It will look for PRs on GitHub labelled with `LABEL_TO_FETCH` and merge those onto the `MAIN_REPO`/master branch. If a PR fails to merge it will be ignored. @@ -25,10 +25,8 @@ The default configuration is to log to *debug.log*, *error.log* and stdout. ## Installation -Clone this repo and configure lemonbot by modifying the configuration in *tag_build.py*. +Download *tag_build.py* and configure lemonbot by modifying the configuration at the top of the file. You can then run the script. -Note that the script depends on being part of a git repo. -The script uses `git pull origin master` to update itself. ## License diff --git a/tag_build.py b/tag_build.py index 0554bc4..6392020 100644 --- a/tag_build.py +++ b/tag_build.py @@ -185,18 +185,7 @@ def handleRemoveReadonly(func, path, exc): if __name__ == "__main__": logger.info("=== Starting build at {date} ===".format(date=datetime.datetime.now())) - logger.debug("Pulling the latest from master") base_dir = os.path.abspath(os.path.dirname(__file__)) - logger.debug("Checking for merge bot updates") - _git("fetch", "origin", cwd=base_dir) - _, stdout = _git("rev-list", "HEAD...origin/master", "--count", cwd=base_dir) - if stdout and int(stdout) > 0: - logger.info("=> Changes detected. Pulling latest version and restarting the application") - _git("pull", "origin", "master", cwd=base_dir) - os.execv(sys.executable, [sys.executable] + sys.argv) - sys.exit(0) - else: - logger.debug("=> No changes to the script repo were detected. Continuing.") t = TagMergeBot(MAIN_REPO, PULL_REPOS, PUSH_REPO) ret = t.fetch_latest_prs()