Skip to content

Commit

Permalink
Merge pull request #55 from Deltares/feature/sig-deploy-backend
Browse files Browse the repository at this point in the history
add backend code to review
  • Loading branch information
SiggyF authored Nov 26, 2018
2 parents 4bcc59d + 7187cb3 commit b2a6142
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
node_modules
dist/
backend-dist*/
tests/e2e/reports/

# sig review files
Expand Down
40 changes: 37 additions & 3 deletions sig-deploy.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
#!/bin/bash
echo -e "This scripts downloads the latest zip url of a release zip to https://portal.sig.eu\n"
# get the url of the latest release
url=$(curl -s https://api.github.com/repos/deltares/liwo-static/releases/latest | jq -r ".zipball_url")

# get the current date
date_yymmdd=$(date +%Y%m%d)
echo -e "Downloading $url to ${date_yymmdd}.zip\n"
wget $url -O liwo-static-${date_yymmdd}.zip

zip_name=deltares_liwo-static_${date_yymmdd}.zip

echo -e "Downloading $url to ${zip_name}\n"
wget $url -O ${zip_name}

# add
# https://repos.deltares.nl/repos/LWB/trunk/sources

# Not all the files are in use

# include
# sources

# exclude:
# liwo.floodplanecalculator.run.*
# liwo.floodimagecalculator.run.*
Expand All @@ -20,5 +30,29 @@ wget $url -O liwo-static-${date_yymmdd}.zip
# include
# etl/ETL-data/Datamodel/*

# lookup version number of backend
backend_version=$(svn info https://repos.deltares.nl/repos/LWB/trunk | grep Revision | grep -Eo "\d+")
backend_dir="backend-dist-${backend_version}"
mkdir ${backend_dir}

# go to new directory
pushd ${backend_dir}

# download relevant sources
svn export https://repos.deltares.nl/repos/LWB/trunk/sources/liwo.GeoServerTools
svn export https://repos.deltares.nl/repos/LWB/trunk/sources/liwo.GeoServerToolsTest
svn export https://repos.deltares.nl/repos/LWB/trunk/sources/liwo.collectmatroosdata
svn export https://repos.deltares.nl/repos/LWB/trunk/sources/liwo.postgisclient
svn export https://repos.deltares.nl/repos/LWB/trunk/sources/liwo.print
svn export https://repos.deltares.nl/repos/LWB/trunk/sources/liwo.run
svn export https://repos.deltares.nl/repos/LWB/trunk/sources/liwo.ws
svn export https://repos.deltares.nl/repos/LWB/trunk/sources/liwo.ws.tests
svn export https://repos.deltares.nl/repos/LWB/trunk/etl/ETL-data/Datamodel
popd

# add the whole directory
zip -r ${zip_name} ${backend_dir}
# cleanup
rm -r ${backend_dir}

echo -e "\nNow upload ${date_yymmdd}.zip to https://portal.sig.eu\n"
echo -e "\nNow upload ${zip_name} to https://portal.sig.eu\n"

0 comments on commit b2a6142

Please sign in to comment.