Skip to content

Commit 8f7a275

Browse files
committed
update ignoreWarnings to give a clean build
1 parent 1900ee2 commit 8f7a275

7 files changed

Lines changed: 196 additions & 16 deletions

File tree

_gencontinuous.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@ECHO OFF
2+
CALL ./_genonce.bat -watch

_gencontinuous.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
./_genonce.sh -watch

_genonce.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
publisher_jar=publisher.jar
3+
input_cache_path=./input-cache/
4+
echo Checking internet connection...
5+
curl -sSf tx.fhir.org > /dev/null
6+
7+
if [ $? -eq 0 ]; then
8+
echo "Online"
9+
txoption=""
10+
else
11+
echo "Offline"
12+
txoption="-tx n/a"
13+
fi
14+
15+
echo "$txoption"
16+
17+
publisher=$input_cache_path/$publisher_jar
18+
if test -f "$publisher"; then
19+
java -jar $publisher -ig . $txoption $*
20+
21+
else
22+
publisher=../$publisher_jar
23+
if test -f "$publisher"; then
24+
java -jar $publisher -ig . $txoption $*
25+
else
26+
echo IG Publisher NOT FOUND in input-cache or parent folder. Please run _updatePublisher. Aborting...
27+
fi
28+
fi

_updatePublisher.bat

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ SET publisher_jar=publisher.jar
77
SET input_cache_path=%CD%\input-cache\
88
SET skipPrompts=false
99

10-
set update_bat_url=https://raw.githubusercontent.com/FHIR/sample-ig/master/_updatePublisher.bat
11-
set gen_bat_url=https://raw.githubusercontent.com/FHIR/sample-ig/master/_genonce.bat
12-
set gencont_bat_url=https://raw.githubusercontent.com/FHIR/sample-ig/master/_gencontinuous.bat
13-
set gencont_sh_url=https://raw.githubusercontent.com/FHIR/sample-ig/master/_gencontinuous.sh
14-
set gen_sh_url=https://raw.githubusercontent.com/FHIR/sample-ig/master/_genonce.sh
15-
set update_sh_url=https://raw.githubusercontent.com/FHIR/sample-ig/master/_updatePublisher.sh
10+
SET scriptdlroot=https://raw.githubusercontent.com/HL7/ig-publisher-scripts/main
11+
SET update_bat_url=%scriptdlroot%/_updatePublisher.bat
12+
SET gen_bat_url=%scriptdlroot%/_genonce.bat
13+
SET gencont_bat_url=%scriptdlroot%/_gencontinuous.bat
14+
SET gencont_sh_url=%scriptdlroot%/_gencontinuous.sh
15+
SET gen_sh_url=%scriptdlroot%/_genonce.sh
16+
SET update_sh_url=%scriptdlroot%/_updatePublisher.sh
1617

17-
IF "%~1"=="/f" SET skipPrompts=true
18+
IF "%~1"=="/f" SET skipPrompts=y
1819

1920

2021
ECHO.
@@ -65,21 +66,21 @@ IF DEFINED FORCE (
6566
GOTO download
6667
)
6768

68-
IF "%skipPrompts%"=="true" (
69-
SET create="Y"
69+
IF "%skipPrompts%"=="y" (
70+
SET create=Y
7071
) ELSE (
7172
SET /p create="Ok? (Y/N) "
7273
)
7374
IF /I "%create%"=="Y" (
74-
ECHO Will place publisher jar here: %input_cache_path%%publisher_jar%
75+
ECHO Will place publisher jar here: %input_cache_path%%publisher_jar%
7576
MKDIR "%input_cache_path%" 2> NUL
7677
GOTO download
7778
)
7879
GOTO done
7980

8081
:upgrade
81-
IF "%skipPrompts%"=="true" (
82-
SET overwrite="Y"
82+
IF "%skipPrompts%"=="y" (
83+
SET overwrite=Y
8384
) ELSE (
8485
SET /p overwrite="Overwrite %jarlocation%? (Y/N) "
8586
)
@@ -132,8 +133,8 @@ GOTO done
132133

133134
ECHO.
134135
ECHO Updating scripts
135-
IF "%skipPrompts%"=="true" (
136-
SET updateScripts="Y"
136+
IF "%skipPrompts%"=="y" (
137+
SET updateScripts=Y
137138
) ELSE (
138139
SET /p updateScripts="Update scripts? (Y/N) "
139140
)
@@ -215,4 +216,4 @@ start copy /y "_updatePublisher.new.bat" "_updatePublisher.bat" ^&^& del "_updat
215216

216217
IF "%skipPrompts%"=="true" (
217218
PAUSE
218-
}
219+
}

_updatePublisher.sh

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
#!/bin/bash
2+
pubsource=https://github.com/HL7/fhir-ig-publisher/releases/latest/download/
3+
publisher_jar=publisher.jar
4+
dlurl=$pubsource$publisher_jar
5+
6+
input_cache_path=$PWD/input-cache/
7+
8+
scriptdlroot=https://raw.githubusercontent.com/HL7/ig-publisher-scripts/main
9+
update_bat_url=$scriptdlroot/_updatePublisher.bat
10+
gen_bat_url=$scriptdlroot/_genonce.bat
11+
gencont_bat_url=$scriptdlroot/_gencontinuous.bat
12+
gencont_sh_url=$scriptdlroot/_gencontinuous.sh
13+
gen_sh_url=$scriptdlroot/_genonce.sh
14+
update_sh_url=$scriptdlroot/_updatePublisher.sh
15+
16+
skipPrompts=false
17+
FORCE=false
18+
19+
if ! type "curl" > /dev/null; then
20+
echo "ERROR: Script needs curl to download latest IG Publisher. Please install curl."
21+
exit 1
22+
fi
23+
24+
while [ "$#" -gt 0 ]; do
25+
case $1 in
26+
-f|--force) FORCE=true ;;
27+
-y|--yes) skipPrompts=true ; FORCE=true ;;
28+
*) echo "Unknown parameter passed: $1. Exiting"; exit 1 ;;
29+
esac
30+
shift
31+
done
32+
33+
echo "Checking internet connection"
34+
case "$OSTYPE" in
35+
linux-gnu* ) ping tx.fhir.org -4 -c 1 -w 1000 >/dev/null ;;
36+
darwin* ) ping tx.fhir.org -c 1 >/dev/null ;;
37+
*) echo "unknown: $OSTYPE"; exit 1 ;;
38+
esac
39+
40+
if [ $? -ne 0 ] ; then
41+
echo "Offline (or the terminology server is down), unable to update. Exiting"
42+
exit 1
43+
fi
44+
45+
if [ ! -d "$input_cache_path" ] ; then
46+
if [ $FORCE != true ]; then
47+
echo "$input_cache_path does not exist"
48+
message="create it?"
49+
read -r -p "$message" response
50+
else
51+
response=y
52+
fi
53+
fi
54+
55+
if [[ $response =~ ^[yY].*$ ]] ; then
56+
mkdir ./input-cache
57+
fi
58+
59+
publisher="$input_cache_path$publisher_jar"
60+
61+
if test -f "$publisher" ; then
62+
echo "IG Publisher FOUND in input-cache"
63+
jarlocation="$publisher"
64+
jarlocationname="Input Cache"
65+
upgrade=true
66+
else
67+
publisher="../$publisher_jar"
68+
upgrade=true
69+
if test -f "$publisher"; then
70+
echo "IG Publisher FOUND in parent folder"
71+
jarlocation="$publisher"
72+
jarlocationname="Parent Folder"
73+
upgrade=true
74+
else
75+
echo "IG Publisher NOT FOUND in input-cache or parent folder"
76+
jarlocation=$input_cache_path$publisher_jar
77+
jarlocationname="Input Cache"
78+
upgrade=false
79+
fi
80+
fi
81+
82+
if [[ $skipPrompts == false ]]; then
83+
84+
if [[ $upgrade == true ]]; then
85+
message="Overwrite $jarlocation? (Y/N) "
86+
else
87+
echo Will place publisher jar here: "$jarlocation"
88+
message="Ok (enter 'y' or 'Y' to continue, any other key to cancel)?"
89+
fi
90+
read -r -p "$message" response
91+
else
92+
response=y
93+
fi
94+
if [[ $skipPrompts == true ]] || [[ $response =~ ^[yY].*$ ]]; then
95+
96+
echo "Downloading most recent publisher to $jarlocationname - it's ~100 MB, so this may take a bit"
97+
curl -L $dlurl -o "$jarlocation" --create-dirs
98+
else
99+
echo cancelled publisher update
100+
fi
101+
102+
if [[ $skipPrompts != true ]]; then
103+
message="Update scripts? (enter 'y' or 'Y' to continue, any other key to cancel)?"
104+
read -r -p "$message" response
105+
fi
106+
107+
if [[ $skipPrompts == true ]] || [[ $response =~ ^[yY].*$ ]]; then
108+
echo "Downloading most recent scripts "
109+
110+
curl -L $update_bat_url -o /tmp/_updatePublisher.new
111+
cp /tmp/_updatePublisher.new _updatePublisher.bat
112+
rm /tmp/_updatePublisher.new
113+
114+
curl -L $gen_bat_url -o /tmp/_genonce.new
115+
cp /tmp/_genonce.new _genonce.bat
116+
rm /tmp/_genonce.new
117+
118+
curl -L $gencont_bat_url -o /tmp/_gencontinuous.new
119+
cp /tmp/_gencontinuous.new _gencontinuous.bat
120+
rm /tmp/_gencontinuous.new
121+
122+
curl -L $gencont_sh_url -o /tmp/_gencontinuous.new
123+
cp /tmp/_gencontinuous.new _gencontinuous.sh
124+
rm /tmp/_gencontinuous.new
125+
126+
curl -L $gen_sh_url -o /tmp/_genonce.new
127+
cp /tmp/_genonce.new _genonce.sh
128+
rm /tmp/_genonce.new
129+
130+
curl -L $update_sh_url -o /tmp/_updatePublisher.new
131+
cp /tmp/_updatePublisher.new _updatePublisher.sh
132+
rm /tmp/_updatePublisher.new
133+
fi

input-cache/txcache/version.ctl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.362
1+
1.9.369

input/ignoreWarnings.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,17 @@
55

66
# The valueset import the XDS-I FormatCode from dicom the SOP id for KOS. But I get a warning from the IG build tool because DICOM does not have this code in their DCM, eventhough XDS-I indicates this is in that code system.
77
The code 1.2.840.10008.5.1.4.1.1.88.59 is not valid in the system http://dicom.nema.org/resources/ontology/DCM
8+
9+
# the Implementation Guide is expected
10+
Validate resource against profile http://hl7.org/fhir/StructureDefinition/ImplementationGuide
11+
12+
# There is provenance use for history
13+
Validate resource against profile http://hl7.org/fhir/StructureDefinition/Bundle
14+
Validate resource against profile http://hl7.org/fhir/StructureDefinition/Provenance
15+
16+
# There is a code system
17+
Validate resource against profile http://hl7.org/fhir/StructureDefinition/CodeSystem
18+
19+
# There is a valueset
20+
Validate resource against profile http://hl7.org/fhir/StructureDefinition/ValueSet
21+

0 commit comments

Comments
 (0)