Skip to content

Commit

Permalink
make version lookup stable
Browse files Browse the repository at this point in the history
  • Loading branch information
StegSchreck committed Oct 30, 2016
1 parent 12e07a3 commit 81a4fe4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
11 changes: 7 additions & 4 deletions core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,13 @@ def trigger_parsing(request):
pm.parse_all_ofm_data(request, site_manager)

remote_version = pm.parse_ofm_version(site_manager)
with open('.version', 'r') as version_file:
own_version = version_file.read().replace('\n', '')
if own_version != "null" and own_version != remote_version:
messages.info(request, "Es ist eine neuere Version von OFM Helper verfügbar: %s. Du nutzt noch: %s." % (remote_version, own_version))
try:
with open('version', 'r') as version_file:
own_version = version_file.read().replace('\n', '')
if own_version != "null" and own_version != remote_version:
messages.info(request, "Es ist eine neuere Version von OFM Helper verfügbar: %s. Du nutzt noch: %s." % (remote_version, own_version))
except IOError:
pass

site_manager.kill()

Expand Down
6 changes: 3 additions & 3 deletions scripts/create_release.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash

touch version
echo `git describe --tags --always` | awk '{split($0,a,"-"); print a[1]}' > version

mkdir release
cd release

touch .version
echo `git describe --tags --always` | awk '{split($0,a,"-"); print a[1]}' > .version

wget --no-check-certificate https://ofmhelper.de/downloads/ofmhelper2exe.tar.gz
tar -xzf ofmhelper2exe.tar.gz
rm ofmhelper2exe.tar.gz
Expand Down
File renamed without changes.

0 comments on commit 81a4fe4

Please sign in to comment.