This repository has been archived by the owner on Mar 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
486 additions
and
329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/.cache/ | ||
/.deploy/ | ||
/build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Make Cloudstate Go documentation | ||
|
||
module := go | ||
upstream := cloudstateio/go-support | ||
branch := docs/current | ||
sources := src build/src/managed | ||
|
||
cloudstate_antora_download := https://github.com/cloudstateio/cloudstate-antora/raw/master/cloudstate-antora | ||
cloudstate_antora := .cache/bin/cloudstate-antora | ||
descriptor := build/site.yml | ||
root_dir := $(shell git rev-parse --show-toplevel) | ||
src_managed := build/src/managed | ||
managed_examples := ${src_managed}/modules/go/examples | ||
managed_partials := ${src_managed}/modules/go/partials | ||
|
||
define copy_example | ||
mkdir -p "${managed_examples}/$$(dirname $1)" | ||
cp "${root_dir}/$1" "${managed_examples}/$1" | ||
endef | ||
|
||
.SILENT: | ||
|
||
build: clean managed validate html | ||
|
||
${cloudstate_antora}: | ||
mkdir -p $$(dirname ${cloudstate_antora}) | ||
curl -Lo ${cloudstate_antora} ${cloudstate_antora_download} | ||
chmod +x ${cloudstate_antora} | ||
|
||
clean-cache: | ||
rm -rf .cache | ||
|
||
update: clean-cache ${cloudstate_antora} | ||
|
||
clean: ${cloudstate_antora} | ||
${cloudstate_antora} clean | ||
|
||
managed: attributes examples | ||
mkdir -p "${src_managed}" | ||
cp src/antora.yml "${src_managed}/antora.yml" | ||
|
||
attributes: ${cloudstate_antora} | ||
mkdir -p "${managed_partials}" | ||
${cloudstate_antora} version | xargs -0 printf ":cloudstate-go-lib-version: %s" \ | ||
> "${managed_partials}/attributes.adoc" | ||
|
||
examples: | ||
# also create empty go module to ignore example sources | ||
mkdir -p "${managed_examples}" | ||
touch "${managed_examples}/go.mod" | ||
$(call copy_example,cloudstate/event.go) | ||
$(call copy_example,cloudstate/eventsourced.go) | ||
$(call copy_example,protobuf/example/shoppingcart/persistence/domain.proto) | ||
$(call copy_example,tck/cmd/tck_shoppingcart/shoppingcart.go) | ||
|
||
${descriptor}: ${cloudstate_antora} | ||
mkdir -p $$(dirname ${descriptor}) | ||
${cloudstate_antora} source --preview --upstream ${upstream} ${sources} > build/source.yml | ||
${cloudstate_antora} site --preview --exclude ${module} build/source.yml > ${descriptor} | ||
|
||
validate: ${descriptor} | ||
${cloudstate_antora} validate ${descriptor} | ||
|
||
html: ${descriptor} | ||
${cloudstate_antora} build ${descriptor} | ||
|
||
validate-links: ${cloudstate_antora} | ||
${cloudstate_antora} validate --no-xrefs --links | ||
|
||
deploy: clean managed | ||
${cloudstate_antora} deploy --module ${module} --upstream ${upstream} --branch ${branch} ${sources} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,19 @@ | ||
# Cloudstate Go documentation | ||
|
||
Documentation source for Cloudstate Go, published to https://cloudstate.io/docs/go/current/ | ||
The Cloudstate documentation is built using [Antora](https://antora.org) with Asciidoc sources. | ||
|
||
To build the docs with [sbt](https://www.scala-sbt.org): | ||
The build is defined in the [Makefile](Makefile) and requires `make`, `bash`, and `docker`. | ||
|
||
``` | ||
sbt paradox | ||
``` | ||
|
||
Can also first start the sbt interactive shell with `sbt`, then run commands. | ||
|
||
The documentation can be viewed locally by opening the generated pages: | ||
To build the documentation run: | ||
|
||
``` | ||
open target/paradox/site/main/index.html | ||
make | ||
``` | ||
|
||
To watch files for changes and rebuild docs automatically: | ||
The generated documentation site will be available in the `build/site` directory: | ||
|
||
``` | ||
sbt ~paradox | ||
open build/site/index.html | ||
``` | ||
|
||
Documentation will be automatically deployed on tagged versions, in the Travis CI builds. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
name: "" | ||
version: master |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.