From 3882557356a5348d3bfdf416973ecf6a65dfed95 Mon Sep 17 00:00:00 2001
From: Rolf Niepraschk <Rolf.Niepraschk@ptb.de>
Date: Mon, 17 Aug 2020 16:16:29 +0200
Subject: [PATCH] odds and ends

---
 README.md | 6 +++---
 server.py | 3 +--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index ca44d04..13be9eb 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 cf19bd9..cc43dfd 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:
-- 
GitLab