Skip to content

Commit 639c6ca

Browse files
committed
fixup! Build single targets
build.sh with no arguments builds all versions build.sh <version> builds single version build.sh latest builds latest version build.sh src builds from src/oas.md Resolve Google Analytics snippet location relative to md2html.js Update tests to reflect inclusion of snippet Pre-requisite to #4341
1 parent 9449ce8 commit 639c6ca

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ target
66
atlassian-ide-plugin.xml
77
node_modules/
88
deploy/
9+
deploy-preview/
910
coverage/
1011
history
1112
Gemfile.lock

scripts/md2html/build.sh

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,17 @@
1212
#
1313
# It contains bashisms
1414

15-
if [ -z "$1" ]; then
16-
deploydir="deploy/oas"
17-
else
15+
if [ "$1" = "src" ]; then
1816
deploydir="deploy-preview"
17+
else
18+
deploydir="deploy/oas"
1919
fi
2020

2121
mkdir -p $deploydir/js
2222
mkdir -p $deploydir/temp
23+
cp -p node_modules/respec/builds/respec-w3c.* $deploydir/js/
2324

2425
latest=$(git describe --abbrev=0 --tags)
25-
latestCopied="none"
26-
lastMinor="-"
2726

2827
if [ -z "$1" ]; then
2928
specifications=$(ls -1 versions/[23456789].*.md | grep -v -e "\-editors" | sort -r)
@@ -35,12 +34,11 @@ else
3534
specifications=$(ls -1 versions/$1.md)
3635
fi
3736

38-
cp -p node_modules/respec/builds/respec-w3c.* $deploydir/js/
37+
latestCopied="none"
38+
lastMinor="-"
3939

4040
for specification in $specifications; do
4141
version=$(basename $specification .md)
42-
minorVersion=${version:0:3}
43-
tempfile="$deploydir/temp/$version.html"
4442

4543
if [ "$1" = "src" ]; then
4644
destination="$deploydir/$version.html"
@@ -50,6 +48,9 @@ for specification in $specifications; do
5048
maintainers="$(dirname $specification)/$version-editors.md"
5149
fi
5250

51+
minorVersion=${version:0:3}
52+
tempfile="$deploydir/temp/$version.html"
53+
5354
echo === Building $version to $destination
5455

5556
node scripts/md2html/md2html.js --maintainers $maintainers $specification > $tempfile

0 commit comments

Comments
 (0)