Compare commits

...

5 Commits

Author SHA1 Message Date
Markus Opolka
b1fdd3fc64 Update to Version 3.6.3+180416 2018-04-18 17:24:55 +02:00
Markus Opolka
84ac1699df Add Update Script 2018-04-16 12:10:50 +02:00
Markus Opolka
b6449a4c22 Update to Version 3.6.2+180406 2018-04-16 12:08:48 +02:00
Markus Opolka
b87a6f75ac Upgrade to Version 3.6.1+180329 2018-04-10 08:45:36 +02:00
Markus Opolka
7096496410 Update to Version 3.5.4+180320 2018-03-28 20:59:38 +02:00
4 changed files with 53 additions and 2 deletions

4
.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
\#*
.\#*
.venv/

View File

@@ -1,6 +1,6 @@
FROM php:7.2-apache
LABEL maintainer="markus@martialblog.de"
ARG version='3.5.3+180316'
ARG version='3.6.3+180416'
# Install OS dependencies
RUN apt-get update && \

View File

@@ -1,6 +1,6 @@
FROM php:7.2-fpm
LABEL maintainer="markus@martialblog.de"
ARG version='3.5.3+180316'
ARG version='3.6.3+180416'
# Install OS dependencies
RUN apt-get update && \

47
upgrade.py Executable file
View File

@@ -0,0 +1,47 @@
#!/usr/bin/env python3
import feedparser
import sys
import subprocess
dockerfile_apache = 'apache/Dockerfile'
dockerfile_fpm = 'fpm/Dockerfile'
limesv_feed_url = 'https://github.com/LimeSurvey/LimeSurvey/releases.atom'
docker_feed_url = 'https://github.com/martialblog/docker-limesurvey/releases.atom'
limesv_feed = feedparser.parse(limesv_feed_url)
docker_feed = feedparser.parse(docker_feed_url)
limesv_current_release = limesv_feed.entries[0].title_detail.value
docker_current_release = docker_feed.entries[0].title_detail.value
if limesv_current_release == docker_current_release:
print('Nothing to do.')
sys.exit(0)
print('New Version {} available. Upgrading...'.format(limesv_current_release))
commit_message = 'Update to Version {}'.format(limesv_current_release)
# Dockerfiles
regexp = 's/[0-9]\.[0-9]\.[0-9]+[0-9]*/{new_version}/'.format(new_version=limesv_current_release)
subprocess.call(['sed', '-i', '-e', regexp, dockerfile_apache])
subprocess.call(['sed', '-i', '-e', regexp, dockerfile_fpm])
print('> Updated Dockerfiles')
# Git Commit/Tag
# subprocess.call(['git', 'checkout', '-b', limesv_current_release])
subprocess.call(['git', 'add', dockerfile_apache])
subprocess.call(['git', 'add', dockerfile_fpm])
subprocess.call(['git', 'commit', '-m', commit_message])
subprocess.call(['git', 'tag', limesv_current_release])
print('> Created new Commit and Tag')
# Git Push
# subprocess.call(['git', 'push', 'origin', limesv_current_release])
subprocess.call(['git', 'push'])
subprocess.call(['git', 'push', 'origin', '--tags'])
print('> Pushed to new Branch')
sys.exit(0)