[smc-discuss] [Git][smc/smc-website][4-font-download-automation] Find latest version of each repo

Balasankar C gitlab at mg.gitlab.com
Sun Apr 8 05:32:13 PDT 2018


Balasankar C pushed to branch 4-font-download-automation at SMC / website


Commits:
90b91189 by Balasankar "Balu" C at 2018-04-08T12:29:30Z
Find latest version of each repo

- - - - -


2 changed files:

- .gitlab-ci.yml
- update_fonts.sh


Changes:

=====================================
.gitlab-ci.yml
=====================================
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,6 +3,9 @@ image: "debian:stable-slim"
 variables:
   GIT_SUBMODULE_STRATEGY: recursive
 pages:
+  before_script:
+    - apt-get -y update
+    - apt-get -y install curl jq
   script:
   - bash update_fonts.sh
   - mkdir .public


=====================================
update_fonts.sh
=====================================
--- a/update_fonts.sh
+++ b/update_fonts.sh
@@ -4,7 +4,8 @@ fonts=(rachana meera manjari raghumalayalamsans dyuthi keraleeyam uroob chilanka
 for font in ${fonts[@]}; do
         mkdir font
         cd font
-        wget "https://gitlab.com/smc/fonts/${font}/-/jobs/artifacts/master/download?job=release" -O artifacts.zip
+        version=$(curl -sSL https://gitlab.com/api/v4/projects/smc%2Ffonts%2F${font}/repository/tags| jq '.[0]["name"]' | tr -d '"')
+        wget "https://gitlab.com/smc/fonts/${font}/-/jobs/artifacts/${version}/download?job=release" -O artifacts.zip
         unzip artifacts.zip
         rm artifacts.zip
         mv build/* .



View it on GitLab: https://gitlab.com/smc/smc-website/commit/90b91189cb0e5236338533334706f1bd6304c52c

---
View it on GitLab: https://gitlab.com/smc/smc-website/commit/90b91189cb0e5236338533334706f1bd6304c52c
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.smc.org.in/pipermail/discuss-smc.org.in/attachments/20180408/3e3cbece/attachment-0002.html>


More information about the discuss mailing list