devapp: move devapp command to x/build/cmd/devapp
Move the devapp command source code along with its static and template
data directories into x/build/cmd for consistency. Leave only the owners
package behind, since that package is more broadly applicable and it
doesn't benefit much from gaining 'cmd' in its import path. People have
some existing muscle memory for finding it, so it's not worth moving it
until there's a good reason.
For golang/go#70913.
Change-Id: I3adf9299a3f803d001b51ebc839bfbc948c63b69
Reviewed-on: https://go-review.googlesource.com/c/build/+/737061
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
diff --git a/README.md b/README.md
index 3f2d95a..b9ea74c 100644
--- a/README.md
+++ b/README.md
@@ -111,12 +111,12 @@
* The Go **gopherbot** bot logic runs on GKE. The code is in
- [cmd/gopherbot](https://dev.golang.org/dir/build/cmd/gopherbot). It
+ [cmd/gopherbot/](https://dev.golang.org/dir/build/cmd/gopherbot). It
depends on maintner via the godata package.
* The **developer dashboard** at https://dev.golang.org/ runs on GKE.
- Its code is in [devapp/](https://dev.golang.org/dir/build/devapp/).
+ Its code is in [cmd/devapp/](https://dev.golang.org/dir/build/cmd/devapp/).
It also depends on maintner via the godata package.
diff --git a/cmd/devapp/Dockerfile b/cmd/devapp/Dockerfile
index 30d3168..fc0accf 100644
--- a/cmd/devapp/Dockerfile
+++ b/cmd/devapp/Dockerfile
@@ -19,7 +19,7 @@
COPY . /go/src/golang.org/x/build/
# Install binary to /go/bin:
-RUN go install golang.org/x/build/devapp
+RUN go install golang.org/x/build/cmd/devapp
FROM debian:trixie
LABEL maintainer="golang-dev@googlegroups.com"
@@ -38,6 +38,6 @@
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /go/bin/devapp /
-COPY devapp/static /static
-COPY devapp/templates /templates
+COPY cmd/devapp/static /static
+COPY cmd/devapp/templates /templates
ENTRYPOINT ["/devapp"]
diff --git a/cmd/devapp/README.md b/cmd/devapp/README.md
new file mode 100644
index 0000000..f830e7a
--- /dev/null
+++ b/cmd/devapp/README.md
@@ -0,0 +1,13 @@
+# devapp
+
+## Local development
+
+```sh
+$ go run . -listen-http=localhost:8080
+```
+
+Then visit http://localhost:8080/ in your browser.
+
+## Deployment
+
+See the documentation on [deployment](../doc/deployment.md).
diff --git a/devapp/data.go b/cmd/devapp/data.go
similarity index 100%
rename from devapp/data.go
rename to cmd/devapp/data.go
diff --git a/devapp/devapp.go b/cmd/devapp/devapp.go
similarity index 100%
rename from devapp/devapp.go
rename to cmd/devapp/devapp.go
diff --git a/devapp/gophercon.go b/cmd/devapp/gophercon.go
similarity index 100%
rename from devapp/gophercon.go
rename to cmd/devapp/gophercon.go
diff --git a/devapp/gophercon_test.go b/cmd/devapp/gophercon_test.go
similarity index 100%
rename from devapp/gophercon_test.go
rename to cmd/devapp/gophercon_test.go
diff --git a/devapp/gzip.go b/cmd/devapp/gzip.go
similarity index 100%
rename from devapp/gzip.go
rename to cmd/devapp/gzip.go
diff --git a/devapp/release.go b/cmd/devapp/release.go
similarity index 100%
rename from devapp/release.go
rename to cmd/devapp/release.go
diff --git a/devapp/release_test.go b/cmd/devapp/release_test.go
similarity index 100%
rename from devapp/release_test.go
rename to cmd/devapp/release_test.go
diff --git a/devapp/reviews.go b/cmd/devapp/reviews.go
similarity index 100%
rename from devapp/reviews.go
rename to cmd/devapp/reviews.go
diff --git a/devapp/server.go b/cmd/devapp/server.go
similarity index 100%
rename from devapp/server.go
rename to cmd/devapp/server.go
diff --git a/devapp/server_test.go b/cmd/devapp/server_test.go
similarity index 100%
rename from devapp/server_test.go
rename to cmd/devapp/server_test.go
diff --git a/devapp/static/favicon.ico b/cmd/devapp/static/favicon.ico
similarity index 100%
rename from devapp/static/favicon.ico
rename to cmd/devapp/static/favicon.ico
Binary files differ
diff --git a/devapp/static/gophercon/index.html b/cmd/devapp/static/gophercon/index.html
similarity index 100%
rename from devapp/static/gophercon/index.html
rename to cmd/devapp/static/gophercon/index.html
diff --git a/devapp/static/index.html b/cmd/devapp/static/index.html
similarity index 89%
rename from devapp/static/index.html
rename to cmd/devapp/static/index.html
index 84441c7..f86f6bf 100644
--- a/devapp/static/index.html
+++ b/cmd/devapp/static/index.html
@@ -18,7 +18,7 @@
<b>About the Dashboards</b>
These dashboards are generated by
-<a href="https://godoc.org/golang.org/x/build/devapp">golang.org/x/build/devapp</a>.
+<a href="https://godoc.org/golang.org/x/build/cmd/devapp">golang.org/x/build/cmd/devapp</a>.
Issue information comes directly from GitHub.
To change something about an issue here, go to GitHub.
diff --git a/devapp/static/js/Chart.min.js b/cmd/devapp/static/js/Chart.min.js
similarity index 100%
rename from devapp/static/js/Chart.min.js
rename to cmd/devapp/static/js/Chart.min.js
diff --git a/devapp/stats.go b/cmd/devapp/stats.go
similarity index 100%
rename from devapp/stats.go
rename to cmd/devapp/stats.go
diff --git a/devapp/stats_test.go b/cmd/devapp/stats_test.go
similarity index 100%
rename from devapp/stats_test.go
rename to cmd/devapp/stats_test.go
diff --git a/devapp/templates/release.tmpl b/cmd/devapp/templates/release.tmpl
similarity index 100%
rename from devapp/templates/release.tmpl
rename to cmd/devapp/templates/release.tmpl
diff --git a/devapp/templates/reviews.tmpl b/cmd/devapp/templates/reviews.tmpl
similarity index 100%
rename from devapp/templates/reviews.tmpl
rename to cmd/devapp/templates/reviews.tmpl
diff --git a/devapp/templates/stats.tmpl b/cmd/devapp/templates/stats.tmpl
similarity index 100%
rename from devapp/templates/stats.tmpl
rename to cmd/devapp/templates/stats.tmpl
diff --git a/devapp/title.go b/cmd/devapp/title.go
similarity index 100%
rename from devapp/title.go
rename to cmd/devapp/title.go
diff --git a/devapp/title_test.go b/cmd/devapp/title_test.go
similarity index 97%
rename from devapp/title_test.go
rename to cmd/devapp/title_test.go
index cd44c13..56945e9 100644
--- a/devapp/title_test.go
+++ b/cmd/devapp/title_test.go
@@ -8,7 +8,7 @@
"reflect"
"testing"
- devapp "golang.org/x/build/devapp"
+ devapp "golang.org/x/build/cmd/devapp"
)
func TestParsePrefixedChangeTitle(t *testing.T) {
diff --git a/cmd/greplogs/broken.go b/cmd/greplogs/broken.go
index 15166cd..aae917e 100644
--- a/cmd/greplogs/broken.go
+++ b/cmd/greplogs/broken.go
@@ -39,7 +39,7 @@
// x/build/dashboard package, not in external configuration files.)
//
// 3. Avoid the need to redeploy a production x/build/cmd/coordinator or
- // x/build/devapp to pick up changes. (A user triaging test failures might
+ // x/build/cmd/devapp to pick up changes. (A user triaging test failures might
// not have access to deploy the coordinator, or might not want to disrupt
// running tests or active gomotes by pushing it.)
//
diff --git a/devapp/README.md b/devapp/README.md
deleted file mode 100644
index c7e0b31..0000000
--- a/devapp/README.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# devapp
-
-## Local development
-
-```sh
-$ go run . -listen-http=localhost:8080
-```
-
-Then visit http://localhost:8080/ in your browser.
-
-## Deployment
-
-See the documentation on [deployment](../doc/deployment.md).
-
-Note that devapp files for deployment have already been moved
-to the cmd/devapp directory, but the command hasn't moved yet.
-Use the cmd/devapp directory when running deployment commands.
diff --git a/devapp/owners/owners.go b/devapp/owners/owners.go
index 54af652..6af2f57 100644
--- a/devapp/owners/owners.go
+++ b/devapp/owners/owners.go
@@ -351,7 +351,7 @@
<p>Reviews are automatically assigned to primary owners.</p>
<p>Alter these entries at
<a href="https://go.googlesource.com/build/+/master/devapp/owners"
- target="_blank" rel="noopener">golang.org/x/build/devapp/owners</a></p>
+ target="_blank" rel="noopener">golang.org/x/build/devapp/owners</a>.</p>
</header>
<main>
<div class="table-header">