From 4000213bc9fd078392281882cbee25410baf3c72 Mon Sep 17 00:00:00 2001
From: Rasmus Sode Lund <rsod@dtu.dk>
Date: Thu, 22 Jun 2023 08:05:46 +0000
Subject: [PATCH] Updated image used to deploy the website

---
 .gitlab-ci.yml      | 1 +
 update_pyproject.py | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e9c4705e..f1b8be46 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -35,6 +35,7 @@ test:
 pages:  # "pages" is a job specifically for GitLab pages [1]
   stage:  # build, test, deploy defined by default [2]
     deploy
+  image: continuumio/anaconda3:latest
   script:  # use sphinx to build docs, move to public page
   - apt-get update
   - pip install --upgrade pip
diff --git a/update_pyproject.py b/update_pyproject.py
index 03c01344..065a0ce4 100644
--- a/update_pyproject.py
+++ b/update_pyproject.py
@@ -15,7 +15,12 @@ with open("README.md") as f:
 # Getting the package version.
 repo = git.cmd.Git("./")
 v = repo.describe("--tags").split("-")
-version_string = f"{v[0]}.dev{v[1]}+{v[2]}"
+if len(v)>1:
+    # Development/untagged version
+    version_string = f"{v[0]}.dev{v[1]}+{v[2]}"
+elif len(v)==1:
+    # Tagged version
+    version_string = f"{v[0]}"
 
 
 # %% Applying the information to the template
-- 
GitLab