-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
hack: configurable repo refs for api docs gen #998
Conversation
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]>
/assign @RichieEscarez We should merge this, then actually generate v0.4 probably. Also would be worth integrating this into v0.4 branch. |
@@ -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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xdg-open "${clone_root}/out/" | |
open "${clone_root}/out/" |
There was a problem hiding this 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
[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 |
sorry, I expected the "blocked review" to prevent Prow from merging (copied suggested changes into #1001 ) |
* 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)
The API docs generation script can now be called with non-hardcoded commit/tag
refs.
This should ease docs releases a tiny bit.