Skip to content

Commit

Permalink
Merge pull request #85 from samply/release-v1.0.1
Browse files Browse the repository at this point in the history
Release v1.0.1
  • Loading branch information
noemide authored May 8, 2020
2 parents 3275db8 + 678c053 commit 5798984
Show file tree
Hide file tree
Showing 45 changed files with 1,184 additions and 772 deletions.
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ jdk: openjdk11
rvm: 2.5
before_install: gem install jekyll
before_script:
- wget -q https://fhir.github.io/latest-ig-publisher/org.hl7.fhir.validator.jar -O validator.jar
- wget -q http://hl7.org/fhir/uv/ips/2019Sep/validator.pack -O ips.pack
- wget -q https://storage.googleapis.com/ig-build/org.hl7.fhir.validator.jar -O validator.jar
script:
- mkdir input-cache
- wget -q https://fhir.github.io/latest-ig-publisher/org.hl7.fhir.publisher.jar -O input-cache/org.hl7.fhir.publisher.jar
- wget -q https://storage.googleapis.com/ig-build/org.hl7.fhir.publisher.jar -O input-cache/org.hl7.fhir.publisher.jar
- JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8
- java -jar input-cache/org.hl7.fhir.publisher.jar -ig ig.ini
- java -jar validator.jar -version 4.0.1 -ig ips.pack -ig output/validator-de.bbmri.fhir.pack input/examples
- java -jar validator.jar -ig output/validator-de.bbmri.fhir.pack -version 4.0.1 input/examples
deploy:
provider: pages
skip_cleanup: true
Expand Down
12 changes: 1 addition & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,4 @@

# BBMRI FHIR® Implementation Guide

[Profile Overview](https://github.com/samply/bbmri-fhir-ig/blob/master/bbmri-ig/input/pagecontent/overview.md)

![Overview profiles](https://github.com/samply/bbmri-fhir-ig/blob/master/bbmri-ig/input/images/GBA-DatamodellFHIR_V05.png)

[Validator Instructions](https://github.com/samply/bbmri-fhir-ig/blob/master/bbmri-ig/input/pagecontent/Validation.md)

[Using References in Bundles](https://github.com/samply/bbmri-fhir-ig/blob/master/bbmri-ig/input/pagecontent/BundleReferences.md)

[Mappings to other projects](https://github.com/samply/bbmri-fhir-ig/blob/master/bbmri-ig/input/pagecontent/mappings.md)

[Referenced Implementation Guides](https://github.com/samply/bbmri-fhir-ig/blob/master/bbmri-ig/input/pagecontent/referencedIGs.md)
This is the repository for the BBMRI.de/GBA sources. The latest release build can be found here: https://samply.github.io/bbmri-fhir-ig/
7 changes: 3 additions & 4 deletions _genonce.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/bin/bash
publisher_jar=org.hl7.fhir.publisher.jar
input_cache_path=./input-cache/
set -e
echo Checking internet connection...
wget -q --spider tx.fhir.org
curl -sSf tx.fhir.org > /dev/null

if [ $? -eq 0 ]; then
echo "Online"
Expand All @@ -17,12 +16,12 @@ echo "$txoption"

publisher=$input_cache_path/$publisher_jar
if test -f "$publisher"; then
JAVA -jar $publisher -ig ig.ini $txoption $*
java -jar $publisher -ig ig.ini $txoption $*

else
publisher=../$publisher_jar
if test -f "$publisher"; then
JAVA -jar $publisher -ig ig.ini $txoption $*
java -jar $publisher -ig ig.ini $txoption $*
else
echo IG Publisher NOT FOUND in input-cache or parent folder. Please run _updatePublisher. Aborting...
fi
Expand Down
171 changes: 158 additions & 13 deletions _updatePublisher.bat
Original file line number Diff line number Diff line change
@@ -1,10 +1,44 @@
@ECHO OFF
SET dlurl=https://fhir.github.io/latest-ig-publisher/org.hl7.fhir.publisher.jar

SETLOCAL

SET dlurl=https://storage.googleapis.com/ig-build/org.hl7.fhir.publisher.jar
SET publisher_jar=org.hl7.fhir.publisher.jar
SET input_cache_path=%CD%\input-cache\
SET skipPrompts=false

set update_bat_url=https://raw.githubusercontent.com/FHIR/sample-ig/master/_updatePublisher.bat
set gen_bat_url=https://raw.githubusercontent.com/FHIR/sample-ig/master/_genonce.bat
set gencont_bat_url=https://raw.githubusercontent.com/FHIR/sample-ig/master/_gencontinuous.bat
set gencont_sh_url=https://raw.githubusercontent.com/FHIR/sample-ig/master/_gencontinuous.sh
set gen_sh_url=https://raw.githubusercontent.com/FHIR/sample-ig/master/_genonce.sh
set update_sh_url=https://raw.githubusercontent.com/FHIR/sample-ig/master/_updatePublisher.sh

IF "%~1"=="/f" SET skipPrompts=true


ECHO.
ECHO Checking internet connection...
PING tx.fhir.org -n 1 -w 1000 | FINDSTR TTL && GOTO isonline
ECHO We're offline, nothing to do...
GOTO end

:isonline
ECHO We're online


:processflags
SET ARG=%1
IF DEFINED ARG (
IF "%ARG%"=="-f" SET FORCE=true
IF "%ARG%"=="--force" SET FORCE=true
SHIFT
GOTO processflags
)

FOR %%x IN ("%CD%") DO SET upper_path=%%~dpx

ECHO.
IF NOT EXIST "%input_cache_path%%publisher_jar%" (
IF NOT EXIST "%upper_path%%publisher_jar%" (
SET jarlocation="%input_cache_path%%publisher_jar%"
Expand All @@ -16,30 +50,44 @@ IF NOT EXIST "%input_cache_path%%publisher_jar%" (
ECHO IG Publisher FOUND in parent folder
SET jarlocation="%upper_path%%publisher_jar%"
SET jarlocationname=Parent folder
GOTO:upgrade
GOTO upgrade
)
) ELSE (
ECHO IG Publisher FOUND in input-cache
SET jarlocation="%input_cache_path%%publisher_jar%"
SET jarlocationname=Input Cache
GOTO:upgrade
GOTO upgrade
)

:create
ECHO Will place publisher jar here: %input_cache_path%%publisher_jar%
SET /p create="Ok? (Y/N)"
IF DEFINED FORCE (
MKDIR "%input_cache_path%" 2> NUL
GOTO download
)

IF "%skipPrompts%"=="true" (
SET create="Y"
) ELSE (
SET /p create="Ok? (Y/N) "
)
IF /I "%create%"=="Y" (
ECHO Will place publisher jar here: %input_cache_path%%publisher_jar%
MKDIR "%input_cache_path%" 2> NUL
GOTO:download
GOTO download
)
GOTO:done
GOTO done

:upgrade
SET /p overwrite="Overwrite %jarlocation%? (Y/N)"
IF "%skipPrompts%"=="true" (
SET overwrite="Y"
) ELSE (
SET /p overwrite="Overwrite %jarlocation%? (Y/N) "
)

IF /I "%overwrite%"=="Y" (
GOTO:download
GOTO download
)
GOTO:done
GOTO done

:download
ECHO Downloading most recent publisher to %jarlocationname% - it's ~100 MB, so this may take a bit
Expand All @@ -60,14 +108,111 @@ CALL POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object Sys
GOTO done

:win7
CALL bitsadmin /transfer GetPublisher /download /priority normal "%dlurl%" "%jarlocation%"
rem this may be triggering the antivirus - bitsadmin.exe is a known threat
rem CALL bitsadmin /transfer GetPublisher /download /priority normal "%dlurl%" "%jarlocation%"

rem this didn't work in win 10
rem CALL Start-BitsTransfer /priority normal "%dlurl%" "%jarlocation%"

rem this should work - untested
call (New-Object Net.WebClient).DownloadFile('%dlurl%', '%jarlocation%')
GOTO done

:win8.1
:win8
:vista
ECHO This script does not yet support Windows %winver%. Please ask for help on http://chat.fhir.org
GOTO done



:done
PAUSE




ECHO.
ECHO Updating scripts
IF "%skipPrompts%"=="true" (
SET updateScripts="Y"
) ELSE (
SET /p updateScripts="Update scripts? (Y/N) "
)
IF /I "%updateScripts%"=="Y" (
GOTO scripts
)
GOTO end


:scripts

REM Download all batch files (and this one with a new name)

SETLOCAL DisableDelayedExpansion



:dl_script_1
ECHO Updating _updatePublisher.sh
call POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%update_sh_url%\",\"_updatePublisher.new.sh\") } else { Invoke-WebRequest -Uri "%update_sh_url%" -Outfile "_updatePublisher.new.sh" }
if %ERRORLEVEL% == 0 goto upd_script_1
echo "Errors encountered during download: %errorlevel%"
goto dl_script_2
:upd_script_1
start copy /y "_updatePublisher.new.sh" "_updatePublisher.sh" ^&^& del "_updatePublisher.new.sh" ^&^& exit


:dl_script_2
ECHO Updating _genonce.bat
call POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%gen_bat_url%\",\"_genonce.new.bat\") } else { Invoke-WebRequest -Uri "%gen_bat_url%" -Outfile "_genonce.bat" }
if %ERRORLEVEL% == 0 goto upd_script_2
echo "Errors encountered during download: %errorlevel%"
goto dl_script_3
:upd_script_2
start copy /y "_genonce.new.bat" "_genonce.bat" ^&^& del "_genonce.new.bat" ^&^& exit

:dl_script_3
ECHO Updating _gencontinuous.bat
call POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%gencont_bat_url%\",\"_gencontinuous.new.bat\") } else { Invoke-WebRequest -Uri "%gencont_bat_url%" -Outfile "_gencontinuous.bat" }
if %ERRORLEVEL% == 0 goto upd_script_3
echo "Errors encountered during download: %errorlevel%"
goto dl_script_4
:upd_script_3
start copy /y "_gencontinuous.new.bat" "_gencontinuous.bat" ^&^& del "_gencontinuous.new.bat" ^&^& exit


:dl_script_4
ECHO Updating _genonce.sh
call POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%gen_sh_url%\",\"_genonce.new.sh\") } else { Invoke-WebRequest -Uri "%gen_sh_url%" -Outfile "_genonce.sh" }
if %ERRORLEVEL% == 0 goto upd_script_4
echo "Errors encountered during download: %errorlevel%"
goto dl_script_5
:upd_script_4
start copy /y "_genonce.new.sh" "_genonce.sh" ^&^& del "_genonce.new.sh" ^&^& exit

:dl_script_5
ECHO Updating _gencontinuous.sh
call POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%gencont_sh_url%\",\"_gencontinuous.new.sh\") } else { Invoke-WebRequest -Uri "%gencont_sh_url%" -Outfile "_gencontinuous.sh" }
if %ERRORLEVEL% == 0 goto upd_script_5
echo "Errors encountered during download: %errorlevel%"
goto dl_script_6
:upd_script_5
start copy /y "_gencontinuous.new.sh" "_gencontinuous.sh" ^&^& del "_gencontinuous.new.sh" ^&^& exit



:dl_script_6
ECHO Updating _updatePublisher.bat
call POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%update_bat_url%\",\"_updatePublisher.new.bat\") } else { Invoke-WebRequest -Uri "%update_bat_url%" -Outfile "_updatePublisher.new.bat" }
if %ERRORLEVEL% == 0 goto upd_script_6
echo "Errors encountered during download: %errorlevel%"
goto end
:upd_script_6
start copy /y "_updatePublisher.new.bat" "_updatePublisher.bat" ^&^& del "_updatePublisher.new.bat" ^&^& exit


:end


IF "%skipPrompts%"=="true" (
PAUSE
}
32 changes: 24 additions & 8 deletions _updatePublisher.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
dlurl=https://fhir.github.io/latest-ig-publisher/org.hl7.fhir.publisher.jar
dlurl=https://storage.googleapis.com/ig-build/org.hl7.fhir.publisher.jar
publisher_jar=org.hl7.fhir.publisher.jar
input_cache_path=./input-cache/

Expand All @@ -9,6 +9,20 @@ if ! type "curl" > /dev/null; then
exit 1
fi

FORCE=false

while :; do
case $1 in
-f|--force) FORCE=true ;;
--)
shift
break
;;
*) break
esac
shift
done

publisher="$input_cache_path$publisher_jar"
if test -f "$publisher"; then
echo "IG Publisher FOUND in input-cache"
Expand All @@ -31,15 +45,17 @@ else
fi
fi

if "$upgrade"; then
message="Overwrite $jarlocation?"
else
echo Will place publisher jar here: "$jarlocation"
message="Ok?"
if [[ "$FORCE" != true ]]; then
if "$upgrade"; then
message="Overwrite $jarlocation? (Y/N) "
else
echo Will place publisher jar here: "$jarlocation"
message="Ok (enter 'y' or 'Y' to continue, any other key to cancel)?"
fi
read -r -p "$message" response
fi

read -r -p "$message" response
if [[ "$response" =~ ^([yY])$ ]]; then
if [[ "$FORCE" == true ]] || [[ "$response" =~ ^([yY])$ ]]; then
echo "Downloading most recent publisher to $jarlocationname - it's ~100 MB, so this may take a bit"
# wget "https://fhir.github.io/latest-ig-publisher/org.hl7.fhir.publisher.jar" -O "$jarlocation"
curl $dlurl -o "$jarlocation" --create-dirs
Expand Down
20 changes: 0 additions & 20 deletions changelog.md

This file was deleted.

Loading

0 comments on commit 5798984

Please sign in to comment.