diff --git a/.gitignore b/.gitignore index c915324809a..0584f068546 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,6 @@ yarn-error.log /node_modules/ /codelists/ /IATI-Codelists-NonEmbedded/ +/IATI-Codelists-Extra/ /venv/ __pycache__ \ No newline at end of file diff --git a/src/gen.sh b/src/gen.sh index 81507763dd1..ca22c81e5f6 100755 --- a/src/gen.sh +++ b/src/gen.sh @@ -10,11 +10,21 @@ else git clone --branch master https://github.com/codeforIATI/IATI-Codelists-NonEmbedded.git fi +if [ -d IATI-Codelists-Extra ]; then + cd IATI-Codelists-Extra || exit 1 + git pull + git checkout master + cd .. +else + git clone --branch master https://github.com/codeforIATI/IATI-Codelists-Extra.git +fi + codelists=("AidType-category" "AidType" "CollaborationType" "Country" "CRSChannelCode" "Currency" "EarmarkingCategory" "FileFormat" "FinanceType-category" "FinanceType" "FlowType" "Language" "LocationType-category" "LocationType" "OrganisationRegistrationAgency" "PolicyMarker" "PolicySignificance" "Region" "Sector" "SectorCategory" "UNSDG-Goals" "UNSDG-Targets") mkdir codelists for f in ${codelists[*]}; do cp IATI-Codelists-NonEmbedded/xml/$f.xml codelists done +cp IATI-Codelists-Extra/xml/* codelists rm -rf docs cp -r static docs