Skip to content

Commit ff0ad8a

Browse files
committed
Start saving current versions in _data, better comments in shell scripts
1 parent 34ad790 commit ff0ad8a

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

api-docs-gen/doc-gen.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,17 @@ export BRANCH=${BRANCH:-develop}
66

77
source `dirname $0`/config.sh
88

9-
rm -rf $DESTINATION
10-
9+
# Change to the Node application with Compodoc installed
1110
cd $BASE/..
1211

12+
# It will be used by Jekyll pages to show current versions
13+
`dirname $0`/pkg-versions.rb > ../_data/versions/$BRANCH.json
14+
15+
# Adjust the README depending on the branch
1316
sed -e "3i$MESSAGE\n" README-src.md > README.md
1417

18+
# Clear the previously generated doc and regenerate
19+
rm -rf $DESTINATION
1520
./node_modules/.bin/compodoc \
1621
-p tsconfig.json \
1722
-d $DESTINATION \

api-docs-gen/docs-refresh.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,4 @@ do
1717
mv $bundle-$BRANCH $bundle
1818
done
1919

20-
cd -
2120
`dirname $0`/doc-gen.sh

api-docs-gen/pkg-versions.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env ruby
2+
3+
require 'json'
4+
5+
bundles = ENV['BUNDLES']
6+
7+
versions = Hash[(bundles.split.map do |l|
8+
version = JSON.parse(File.read("#{ENV['BASE']}/#{l}/package.json"))['version']
9+
[l, version]
10+
end)]
11+
12+
puts JSON.pretty_generate(versions)

0 commit comments

Comments
 (0)