Commit 18fd9c03 authored by Houtan Bastani's avatar Houtan Bastani

download page now automatically updates if there’s a new package in the...

download page now automatically updates if there’s a new package in the release folder on the server
parent 04923785
......@@ -5,6 +5,9 @@ _site
# Snapshots
assets/snapshot/*
# Releases
assets/release/*
# Logo
assets/images/logo/*.aux
assets/images/logo/*.log
......
......@@ -18,6 +18,7 @@ build:
- (cd _data && wget https://www.dynare.org/RePEc/cpm/dynare/wp.yml)
- pwd
- ls -la
- bash setup-release.sh
- bash setup-snapshots.sh
- bundle install
script:
......
......@@ -173,6 +173,7 @@ exclude:
- /assets/images/logo/dbkgd_ws.png
- /assets/RePEc/rdf2yml.py
- .gitlab-ci.yml
- setup-release.sh
- setup-snapshots.sh
- COPYING
keep_files:
......@@ -300,3 +301,20 @@ defaults:
path: "assets/snapshot/source"
values:
snapshot: "source"
# release
- scope:
path: "assets/release/windows"
values:
release: "windows-exe"
- scope:
path: "assets/release/windows-zip"
values:
release: "windows-zip"
- scope:
path: "assets/release/macosx"
values:
release: "macosx"
- scope:
path: "assets/release/source"
values:
release: "source"
......@@ -18,13 +18,19 @@
</p>
<p class="stable">
<i class="icon-document-download"></i>
<a href="https://www.dynare.org/release/windows/dynare-4.5.6-win.exe">Dynare 4.5.6 (exe)</a>
<a href="https://www.dynare.org/release/windows/dynare-4.5.6-win.exe.sig">[signature]</a>
{% assign release = site.static_files | where: "release", "windows-exe" | first %}
{% assign version = release.name | split: '-' %}
{% assign version = version[1] %}
<a href="https://www.dynare.org/release/windows/{{ release.name }}">Dynare {{ version }} ({{ release.extname }})</a>
<a href="https://www.dynare.org/release/windows/{{ release.name }}.sig">[signature]</a>
</p>
<p class="stable">
<i class="icon-document-download"></i>
<a href="https://www.dynare.org/release/windows-zip/dynare-4.5.6-win.zip">Dynare 4.5.6 (zip)</a>
<a href="https://www.dynare.org/release/windows-zip/dynare-4.5.6-win.zip.sig">[signature]</a>
{% assign release = site.static_files | where: "release", "windows-zip" | first %}
{% assign version = release.name | split: '-' %}
{% assign version = version[1] %}
<a href="https://www.dynare.org/release/windows-zip/{{ release.name }}">Dynare {{ version }} ({{ release.extname }})</a>
<a href="https://www.dynare.org/release/windows-zip/{{ release.name }}.sig">[signature]</a>
</p>
</section>
......@@ -40,8 +46,11 @@
</p>
<p class="stable">
<i class="icon-document-download"></i>
<a href="https://www.dynare.org/release/macosx/dynare-4.5.6.pkg">Dynare 4.5.6 (pkg)</a>
<a href="https://www.dynare.org/release/macosx/dynare-4.5.6.pkg.sig">[signature]</a>
{% assign release = site.static_files | where: "release", "macosx" | first %}
{% assign version = release.name | split: '-' %}
{% assign version = version[1] | split: release.extname | first %}
<a href="https://www.dynare.org/release/macosx/{{ release.name }}">Dynare {{ version }} ({{ release.extname }})</a>
<a href="https://www.dynare.org/release/macosx/{{ release.name }}.sig">[signature]</a>
</p>
</section>
......@@ -60,8 +69,11 @@
</p>
<p class="stable">
<i class="icon-document-download"></i>
<a href="https://www.dynare.org/release/source/dynare-4.5.6.tar.xz">Dynare 4.5.6 (tar.gz)</a>
<a href="https://www.dynare.org/release/source/dynare-4.5.6.tar.xz.sig">[signature]</a>
{% assign release = site.static_files | where: "release", "source" | first %}
{% assign version = release.name | split: '-' %}
{% assign version = version[1] | split: '.tar.' | first %}
<a href="https://www.dynare.org/release/source/{{ release.name }}">Dynare {{ version }} (.tar{{ release.extname }})</a>
<a href="https://www.dynare.org/release/source/{{ release.name }}.sig">[signature]</a>
</p>
</section>
</div>
......
#!/bin/bash
mkdir -p assets/release
cd assets/release
wget http://www.dynare.org/release/macosx.json
wget http://www.dynare.org/release/source.json
wget http://www.dynare.org/release/windows.json
wget http://www.dynare.org/release/windows-zip.json
declare -a arr=("macosx" "source" "windows" "windows-zip")
for dir in "${arr[@]}"
do
mkdir $dir
filenames=(`jq .[].filename $dir.json`)
timestamps=(`jq .[].date $dir.json`)
n=`jq length $dir.json`
n=`expr $n - 1`
cd $dir
for i in `seq 0 $n`;
do
filename="${filenames[i]%\"}"
filename="${filename#\"}"
timestamp="${timestamps[i]%\"}"
timestamp="${timestamp#\"}"
echo $filename $timestamp
touch -amt $timestamp $filename
done
cd ..
done
rm *.json
cd ../..
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment