Skip to content

Commit

Permalink
hack: configurable repo refs for api docs gen (#998)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
ahmetb authored and knative-prow-robot committed Mar 15, 2019
1 parent 1a8a63d commit 3a02419
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions hack/gen-api-reference-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -euo pipefail

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

KNATIVE_SERVING_REPO="github.com/knative/serving"
KNATIVE_SERVING_COMMIT="v0.2.3"
KNATIVE_SERVING_COMMIT="${KNATIVE_SERVING_COMMIT:?specify the \$KNATIVE_SERVING_COMMIT variable}"
KNATIVE_SERVING_OUT_FILE="serving.md"

KNATIVE_BUILD_REPO="github.com/knative/build"
KNATIVE_BUILD_COMMIT="v0.2.0"
KNATIVE_BUILD_COMMIT="${KNATIVE_BUILD_COMMIT:?specify the \$KNATIVE_BUILD_COMMIT variable}"
KNATIVE_BUILD_OUT_FILE="build.md"

KNATIVE_EVENTING_REPO="github.com/knative/eventing"
KNATIVE_EVENTING_COMMIT="v0.2.1"
KNATIVE_EVENTING_COMMIT="${KNATIVE_EVENTING_COMMIT:?specify the \$KNATIVE_EVENTING_COMMIT variable}"
KNATIVE_EVENTING_OUT_FILE="eventing/eventing.md"

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

log() {
Expand Down Expand Up @@ -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/"
fi
}

Expand Down

0 comments on commit 3a02419

Please sign in to comment.