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

hack: configurable repo refs for api docs gen #998

Merged
merged 1 commit into from
Mar 15, 2019

Conversation

ahmetb
Copy link
Contributor

@ahmetb ahmetb commented Mar 14, 2019

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.

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]>
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Mar 14, 2019
@ahmetb
Copy link
Contributor Author

ahmetb commented Mar 14, 2019

/assign @RichieEscarez

We should merge this, then actually generate v0.4 probably. Also would be worth integrating this into v0.4 branch.

@knative-prow-robot knative-prow-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 14, 2019
@@ -163,6 +164,8 @@ main() {
log "Copy the files in reference/ directory to knative/docs."
if command -v open >/dev/null; then
open "${clone_root}/out/"
elif command -v xdg-open >/dev/null; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This failed for me on Linux. I searched and found this on stackoverflow:
[On linux] "The open command is a link to the openvt command and opens a binary in a new virtual console." which is not what we want and why the conditional does not fail.

I tried swapping the commands so that 'xdg-open' is tried/run first, before 'open', and it worked. But since I dont have my Mac setup right now to test the script, i've only just tired running 'xdg-open', which results in "-bash: xdg-open: command not found" (so I think we should be okay?).

@@ -163,6 +164,8 @@ main() {
log "Copy the files in reference/ directory to knative/docs."
if command -v open >/dev/null; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if command -v open >/dev/null; then
if command -v xdg-open >/dev/null; then

@@ -163,6 +164,8 @@ main() {
log "Copy the files in reference/ directory to knative/docs."
if command -v open >/dev/null; then
open "${clone_root}/out/"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
open "${clone_root}/out/"
xdg-open "${clone_root}/out/"

@@ -163,6 +164,8 @@ main() {
log "Copy the files in reference/ directory to knative/docs."
if command -v open >/dev/null; then
open "${clone_root}/out/"
elif command -v xdg-open >/dev/null; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
elif command -v xdg-open >/dev/null; then
elif command -v open >/dev/null; then

@@ -163,6 +164,8 @@ main() {
log "Copy the files in reference/ directory to knative/docs."
if command -v open >/dev/null; then
open "${clone_root}/out/"
elif command -v xdg-open >/dev/null; then
xdg-open "${clone_root}/out/"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
xdg-open "${clone_root}/out/"
open "${clone_root}/out/"

Copy link
Contributor

@RichieEscarez RichieEscarez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than my comment and suggested changes, this works great! Thanks @ahmetb !

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 15, 2019
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahmetb, RichieEscarez

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@RichieEscarez
Copy link
Contributor

RichieEscarez commented Mar 15, 2019

sorry, I expected the "blocked review" to prevent Prow from merging (copied suggested changes into #1001 )

vorburger added a commit to vorburger/docs that referenced this pull request Mar 19, 2019
* master:
  fix serving directory path (knative#1015)
  site: insert 'docs' container folder at root (for knative.dev) (knative#1007)
  hack: update ref docs gen script to cleanup tmp dirs (knative#1001)
  hack: configurable repo refs for api docs gen (knative#998)
  Update traffic splitting example to use Release mode (knative#964)
  Update Eventing cronjob-source for Cloudevents (knative#1006)
  Update issue templates -- delete extra template, add security note (knative#1003)
  Update issue templates -- separate feature request from new/changing functionality (knative#1002)
  Clarifying Docs contributor roles (knative#958)
  update OpenShift on install (knative#975)
  Update the monitoring file version (knative#996)
  Update Dockerfile (knative#991)
  update Knative-with-OpenShift from 3.10 to 3.11 (and minor clean up) (knative#974)
  make install/scripts/knative-with-openshift.sh +x and -e (knative#973)
  fix wrong path (knative#989)
  Update README.md (knative#987)
  Change MiniKube installation to require 1.12 cluster. (knative#873)
  fix typo (knative#963)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants