From 23268c3ab8ab8e47aa594ac7510ec2c2f83b2d2e Mon Sep 17 00:00:00 2001
From: Eliot Berriot <contact@eliotberriot.com>
Date: Fri, 23 Aug 2019 11:51:56 +0200
Subject: [PATCH] =?UTF-8?q?Added=20CI=C2=A0script?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .gitlab-ci.yml | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..f2c6aed
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,32 @@
+stages:
+  - deploy
+
+pages:
+  stage: deploy
+  image: alpine
+  variables:
+    LATEST_VERSION_URL: https://docs.funkwhale.audio/latest.txt
+  before_script:
+    - apk add curl
+  script:
+    - |
+      echo "Retrieving latest version from $LATEST_VERSION_URL"
+      funkwhale_version=$(curl -sfL $LATEST_VERSION_URL || true)
+      if [ -z "$funkwhale_version" ]; then
+          echo "Could not retrieve latest version!"
+          exit 1
+      fi
+      echo "Latest version is $funkwhale_version"
+      sed -i "0,/funkwhale_version_placeholder/{s/funkwhale_version_placeholder/$funkwhale_version/}" install.sh
+    - mkdir -p public
+    - cp install.sh public/
+    - cp install.sh public/index.html
+    - cp upgrade.sh public/upgrade.sh
+
+  artifacts:
+    paths:
+      - public
+  # only:
+  #   - master@funkwhale/ansible
+  tags:
+    - docker
-- 
GitLab