Merge branch 'master' into development

This commit is contained in:
Sonny Bakker 2020-08-05 21:34:34 +02:00
commit 285da805cb
2 changed files with 4 additions and 2 deletions

View file

@ -8,7 +8,7 @@ deploy:
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
before_script: before_script:
- pip install ansible --quiet - pip install ansible --quiet
- git clone https://git.fudiggity.nl/sonny/newsreader.git deployment - git clone https://git.fudiggity.nl/sonny/ansible-playbooks.git deployment
- mkdir /root/.ssh - mkdir /root/.ssh
- echo "$DEPLOY_HOST_KEY" > /root/.ssh/known_hosts - echo "$DEPLOY_HOST_KEY" > /root/.ssh/known_hosts
- echo "$DEPLOY_KEY" > deployment/deploy_key && chmod 0600 deployment/deploy_key - echo "$DEPLOY_KEY" > deployment/deploy_key && chmod 0600 deployment/deploy_key

View file

@ -7,7 +7,9 @@ def get_current_version():
return os.environ["VERSION"] return os.environ["VERSION"]
try: try:
output = subprocess.check_output(["git", "describe"], universal_newlines=True) output = subprocess.check_output(
["git", "describe", "--tags"], universal_newlines=True
)
return output.strip() return output.strip()
except (subprocess.CalledProcessError, OSError): except (subprocess.CalledProcessError, OSError):
return "" return ""