Skip to content

Commit

Permalink
ci(sync_generated): create new nav file when missing (#1363)
Browse files Browse the repository at this point in the history
Signed-off-by: Charly Molter <[email protected]>
  • Loading branch information
lahabana committed Jun 20, 2023
1 parent f85793e commit fecef9e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 24 deletions.
38 changes: 19 additions & 19 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@ PATH
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.1)
addressable (2.8.4)
public_suffix (>= 2.0.2, < 6.0)
byebug (11.1.3)
colorator (1.1.0)
concurrent-ruby (1.2.0)
dry-cli (0.7.0)
concurrent-ruby (1.2.2)
dry-cli (1.0.0)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.15.5)
foreman (0.87.2)
forwardable-extended (2.6.0)
google-protobuf (3.22.2-arm64-darwin)
google-protobuf (3.22.2-x86_64-darwin)
google-protobuf (3.22.2-x86_64-linux)
google-protobuf (3.23.3-arm64-darwin)
google-protobuf (3.23.3-x86_64-darwin)
google-protobuf (3.23.3-x86_64-linux)
http_parser.rb (0.8.0)
i18n (1.12.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
jekyll (4.3.2)
addressable (~> 2.4)
Expand All @@ -44,7 +44,7 @@ GEM
webrick (~> 1.7)
jekyll-contentblocks (1.2.0)
jekyll
jekyll-generator-single-source (0.0.5)
jekyll-generator-single-source (0.0.8)
jekyll (>= 4.2, < 5.0)
jekyll-last-modified-at (1.3.0)
jekyll (>= 3.7, < 5.0)
Expand All @@ -64,7 +64,7 @@ GEM
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.4)
liquid-c (4.0.0)
liquid-c (4.0.1)
liquid (>= 3.0.0)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
Expand All @@ -74,10 +74,10 @@ GEM
forwardable-extended (~> 2.6)
posix-spawn (0.3.15)
public_suffix (5.0.1)
rack (3.0.7)
rack-proxy (0.7.4)
rack (3.0.8)
rack-proxy (0.7.6)
rack
rackup (0.2.2)
rackup (0.2.3)
rack (>= 3.0.0.beta1)
webrick
rake (13.0.6)
Expand All @@ -87,18 +87,18 @@ GEM
rexml (3.2.5)
rouge (3.30.0)
safe_yaml (1.0.5)
sass-embedded (1.60.0)
google-protobuf (~> 3.21)
rake (>= 10.0.0)
sass-embedded (1.63.4)
google-protobuf (~> 3.23)
rake (>= 13.0.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.4.2)
vite_ruby (3.2.6)
dry-cli (~> 0.7.0)
vite_ruby (3.3.3)
dry-cli (>= 0.7, < 2)
rack-proxy (~> 0.6, >= 0.6.1)
zeitwerk (~> 2.2)
webrick (1.7.0)
zeitwerk (2.6.1)
webrick (1.8.1)
zeitwerk (2.6.8)

PLATFORMS
arm64-darwin-21
Expand Down
2 changes: 0 additions & 2 deletions app/_data/docs_nav_kuma_dev.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
product: kuma
generate: true
assume_generated: true
release: dev
items:
- title: Introduction
group: true
Expand Down
11 changes: 8 additions & 3 deletions sync_generated.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,19 @@ popd

for branch in $(jq -r '.[]' ../kuma/active-branches.json); do
echo "Copying $branch"
i="app/docs/${branch}"
v="${branch}"
if [[ "${branch}" == "master" ]]; then
i=app/docs/dev
v=dev
else
i="app/docs/$(echo "${branch}" | sed 's/release-//g').x"
v="$(echo "${branch}" | sed 's/release-//g').x"
fi
i="app/docs/${v}"
mkdir -p "${i}"

if [[ ! -f "app/_data/docs_nav_kuma_${v}.yml" ]]; then
cp app/_data/docs_nav_kuma_dev.yml "app/_data/docs_nav_kuma_${v}.yml"
fi

pushd ../kuma
git checkout "$kumahq/$branch"
popd
Expand Down

0 comments on commit fecef9e

Please sign in to comment.