diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 51c4b291420063115f3b744b70d81946fcba6898..10a010e8a9dd08b2c7ae2e44f8e0893d601af2b8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,6 +16,9 @@ build: - gem install jekyll - gem install bundler - (cd _data && wget http://www.dynare.org/RePEc/cpm/dynare/wp.yml) + - pwd + - ls -la + - bash setup-snapshots.sh - bundle install script: - (cd assets/images/logo && make) diff --git a/_config.yml b/_config.yml index 5f22ff7b2aa676cfd6d46dbef48b2d3c302432bc..3ae4a71504e14a64fab46f16d03af3ac9915e964 100644 --- a/_config.yml +++ b/_config.yml @@ -170,6 +170,8 @@ exclude: - /assets/images/logo/*.tex - /assets/images/logo/*.sh - /assets/RePEc/rdf2yml.py + - .gitlab-ci.yml + - setup-snapshots.sh keep_files: - .git - /assets/images/* diff --git a/setup-snapshots.sh b/setup-snapshots.sh new file mode 100755 index 0000000000000000000000000000000000000000..35b248e57307511a92c8d64d297f4fdd07fbce42 --- /dev/null +++ b/setup-snapshots.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +mkdir -p assets/snapshot +cd assets/snapshot + +wget http://eris.dynare.org/snapshot/macosx.json +wget http://eris.dynare.org/snapshot/source.json +wget http://eris.dynare.org/snapshot/windows.json +wget http://eris.dynare.org/snapshot/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 ../..