diff --git a/README.md b/README.md index ca44d0418840b1f08751d7eba3914252eccc5ab5..13be9eb2cceb51035a7051fc845819775b6c858c 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ content: ```shell #!/bin/bash -# Writes the short tag value to the VERSION file in the top-level directory -# of the Git repository +# In the case of "git push --tags", writes the short tag value to the +# VERSION file in the top level directory of the Git repository toplevel=$(git rev-parse --show-toplevel) f=${toplevel}/VERSION @@ -22,7 +22,7 @@ new_version=$(git describe --tags --abbrev=0) if [ "$old_version" != "$new_version" ]; then echo "$new_version" > $f git commit -am "update version to '"$new_version"'" - git push origin + git push origin # Is required because normal push does not necessarily happen fi exit 0 diff --git a/server.py b/server.py index cf19bd995d7a1fcd393909cd8b8d8904adb62632..cc43dfd23ff67660bc73ca425567537f7192105f 100644 --- a/server.py +++ b/server.py @@ -19,7 +19,7 @@ def version(): if version: return jsonify({'version':version}) else: - return utils.return_error('Version unknown') + return jsonify({'error':'Version unknown'}) @app.route('/update', methods=['POST']) def update(): @@ -29,7 +29,6 @@ def update(): tarball_url = req['repository']['homepage'] + '/-/archive/master/' + \ req['repository']['name'] + '-master.tar' version = str(utils.get_version()) - print(tarball_url) with open('./LOG', 'a') as f: print(datetime.now().strftime("[%Y-%m-%d %H:%M:%S] " + version), file=f) try: