README: update deployment instructions for module mode The go.mod file did not provide all dependencies before the glcoud deploy step, because there was no go mod tidy or go get step after rsync was used to copy the golang.org/x/tools/cmd/present command. The previous deploy instructions assumed a GOPATH layout where ../tools is a checkout of the golang.org/x/tools repository. That may still hold today, but it's hard to control or predict what commit will be checked out at that path. It's also hard to arrange that the same version of x/tools is used for the present command as well as its dependencies. Change the approach to use go get to select the version of x/tools that provides the golang.org/x/tools/cmd/present command intended for deployment. Also rewrite the deployment into numbered steps. Change the README format to use Markdown and expand some general sections to be more consistent with our READMEs in other repos. Fixes golang/go#44164. Updates golang/go#36825. Change-Id: Ibf01b076d6a6767184d092cbd7116c20007c8fa7 Reviewed-on: https://go-review.googlesource.com/c/talks/+/290192 Trust: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Alexander Rakoczy <alex@golang.org>
diff --git a/README b/README deleted file mode 100644 index 34460f0..0000000 --- a/README +++ /dev/null
@@ -1,16 +0,0 @@ -This repository holds various Go talks that may be viewed with the present tool. - -To install the present tool, use go get: - - go get golang.org/x/tools/cmd/present - -To deploy these talks to App Engine, copy the contents of tools/cmd/present to -the root of this repository: - - rsync -a ../tools/cmd/present/ . - -Then run: - - gcloud --project=golang-org app deploy - -To submit changes to this repository, see https://golang.org/doc/contribute.html.
diff --git a/README.md b/README.md new file mode 100644 index 0000000..135d5ee --- /dev/null +++ b/README.md
@@ -0,0 +1,61 @@ +# Go Talks + +[](https://pkg.go.dev/golang.org/x/talks) + +This repository holds various Go talks that may be viewed with the present tool. + +## Viewing Locally + +To install the present tool, use `go get`: + +``` +go get golang.org/x/tools/cmd/present +``` + +To view talks, run `present` in the `content` directory and then +visit [http://127.0.0.1:3999](http://127.0.0.1:3999) in your browser. + +## Report Issues / Send Patches + +This repository uses Gerrit for code changes. To learn how to submit changes to +this repository, see https://golang.org/doc/contribute.html. + +The main issue tracker for the talks repository is located at +https://github.com/golang/go/issues. Prefix your issue with "x/talks:" in the +subject line, so it is easy to find. + +## Deploying + +To deploy these talks to talks.golang.org hosted on App Engine: + +1. Add a version of `golang.org/x/tools/cmd/present` that you intend to + use in this deploy as a dependency of this module: + + ``` + go get -d golang.org/x/tools/cmd/present@latest + ``` + +2. Copy the contents of `golang.org/x/tools/cmd/present` to the root of + this repository: + + ``` + rsync -r $(go list -f '{{.Dir}}' golang.org/x/tools/cmd/present)/ . + ``` + +3. Run the deploy: + + ``` + GO111MODULE=on gcloud --project=golang-org app deploy --no-promote app.yaml + ``` + + This will create a new version, which can be viewed within the + [golang-org GCP project](https://console.cloud.google.com/appengine/versions?project=golang-org&serviceId=talks). + +4. Check that the deployed version looks OK (click the version link in GCP). + +5. If all is well, click "Migrate Traffic" to move 100% of the talks.golang.org + traffic to the new version. + +6. Clean up the local file modifications that steps 1 and 2 caused. + +7. You're done.