xref: /aosp_15_r20/external/stardoc/update-stardoc-docs.sh (revision b2fa42943c124aa9c7163734493fc7a7559681cf)
1*b2fa4294SXin Li#!/usr/bin/env bash
2*b2fa4294SXin Li# Copyright 2019 The Bazel Authors. All rights reserved.
3*b2fa4294SXin Li#
4*b2fa4294SXin Li# Licensed under the Apache License, Version 2.0 (the "License");
5*b2fa4294SXin Li# you may not use this file except in compliance with the License.
6*b2fa4294SXin Li# You may obtain a copy of the License at
7*b2fa4294SXin Li#
8*b2fa4294SXin Li#    http://www.apache.org/licenses/LICENSE-2.0
9*b2fa4294SXin Li#
10*b2fa4294SXin Li# Unless required by applicable law or agreed to in writing, software
11*b2fa4294SXin Li# distributed under the License is distributed on an "AS IS" BASIS,
12*b2fa4294SXin Li# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*b2fa4294SXin Li# See the License for the specific language governing permissions and
14*b2fa4294SXin Li# limitations under the License.
15*b2fa4294SXin Li#
16*b2fa4294SXin Li# Renerates the Stardoc rule documentation from source in @io_bazel.
17*b2fa4294SXin Li#
18*b2fa4294SXin Li# This should only need to be run for cutting a new Stardoc release.
19*b2fa4294SXin Li
20*b2fa4294SXin Liset -eu
21*b2fa4294SXin Li
22*b2fa4294SXin Liecho "** Generating Stardoc documentation..."
23*b2fa4294SXin Libazel build //stardoc:stardoc_doc.md
24*b2fa4294SXin Li
25*b2fa4294SXin Liecho "** Copying result to docs/stardoc_rule.md ..."
26*b2fa4294SXin Licp bazel-bin/stardoc/stardoc_doc.md docs/stardoc_rule.md
27*b2fa4294SXin Li
28*b2fa4294SXin Liecho "** Done! Please manually verify the new documentation looks good before committing."
29*b2fa4294SXin Li
30