Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(sync_generated): create new nav file when missing #1363

Merged
merged 1 commit into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading