Skip to content

Commit 3a02419

Browse files
ahmetbknative-prow-robot
authored andcommitted
hack: configurable repo refs for api docs gen (#998)
The API docs generation script can now be called with non-hardcoded commit/tag refs. KNATIVE_SERVING_COMMIT=v0.4.0 \ KNATIVE_BUILD_COMMIT=v0.4.0 \ KNATIVE_EVENTING_COMMIT=v0.2.1 \ KNATIVE_EVENTING_SOURCES_COMMIT=v0.2.1 ./gen-api-reference-docs.sh This should ease docs releases a tiny bit. Signed-off-by: Ahmet Alp Balkan <[email protected]>
1 parent 1a8a63d commit 3a02419

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

hack/gen-api-reference-docs.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1616
# See the License for the specific language governing permissions and
1717
# limitations under the License.
18+
1819
set -euo pipefail
1920

2021
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
@@ -25,19 +26,19 @@ REFDOCS_REPO="https://${REFDOCS_PKG}.git"
2526
REFDOCS_VER="5c208a6"
2627

2728
KNATIVE_SERVING_REPO="github.com/knative/serving"
28-
KNATIVE_SERVING_COMMIT="v0.2.3"
29+
KNATIVE_SERVING_COMMIT="${KNATIVE_SERVING_COMMIT:?specify the \$KNATIVE_SERVING_COMMIT variable}"
2930
KNATIVE_SERVING_OUT_FILE="serving.md"
3031

3132
KNATIVE_BUILD_REPO="github.com/knative/build"
32-
KNATIVE_BUILD_COMMIT="v0.2.0"
33+
KNATIVE_BUILD_COMMIT="${KNATIVE_BUILD_COMMIT:?specify the \$KNATIVE_BUILD_COMMIT variable}"
3334
KNATIVE_BUILD_OUT_FILE="build.md"
3435

3536
KNATIVE_EVENTING_REPO="github.com/knative/eventing"
36-
KNATIVE_EVENTING_COMMIT="v0.2.1"
37+
KNATIVE_EVENTING_COMMIT="${KNATIVE_EVENTING_COMMIT:?specify the \$KNATIVE_EVENTING_COMMIT variable}"
3738
KNATIVE_EVENTING_OUT_FILE="eventing/eventing.md"
3839

3940
KNATIVE_EVENTING_SOURCES_REPO="github.com/knative/eventing-sources"
40-
KNATIVE_EVENTING_SOURCES_COMMIT="v0.2.1"
41+
KNATIVE_EVENTING_SOURCES_COMMIT="${KNATIVE_EVENTING_SOURCES_COMMIT:?specify the \$KNATIVE_EVENTING_SOURCES_COMMIT variable}"
4142
KNATIVE_EVENTING_SOURCES_OUT_FILE="eventing/eventing-sources.md"
4243

4344
log() {
@@ -163,6 +164,8 @@ main() {
163164
log "Copy the files in reference/ directory to knative/docs."
164165
if command -v open >/dev/null; then
165166
open "${clone_root}/out/"
167+
elif command -v xdg-open >/dev/null; then
168+
xdg-open "${clone_root}/out/"
166169
fi
167170
}
168171

0 commit comments

Comments
 (0)