Name: gomoz
Owner: Mozilla Services
Description: Source files for go.mozilla.org
Created: 2016-06-02 13:51:19.0
Updated: 2018-05-21 20:52:01.0
Pushed: 2018-05-21 20:51:59.0
Homepage: null
Size: 366
Language: HTML
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This repository contains the source files of go.mozilla.org.
Create a directory with the name of your project and create an index.html file in the directory that references the git location of the source code.
You can copy an existing index.html from another project and edit it.
The name you use in go.mozilla.org/<project>
does not need to be the
same as the one you host the code under. For example,
https://github.com/mozilla-services/hawk-go
uses go.mozilla.org/hawk
.
If your project has packages, create a directory structure that matches the packages structure, and give each package its own index.html file.
For example:
plex/
index.html
modules
??? authorizedkeys
? ??? index.html
??? aws
? ??? index.html
??? datadog
? ??? index.html
??? index.html
Note that sub-packages must use the git location of the top-level repository. For example,
a name="go-import"
content="go.mozilla.org/userplex/modules/aws
git https://github.com/mozilla-services/userplex">
The sub-package go.mozilla.org/userplex/modules/aws
uses the top-level git
repository https://github.com/mozilla-services/userplex
.
This is only needed for packages that are importable. The main
package does
not need to specify a custom import path since it cannot be imported by other
Go programs.
In the source go files of your project, next to the package name, add a line
that references the go.mozilla.org
import path:
age mymodule // import "go.mozilla.org/myproject/mymodule"
Note that your project must now live under
$GOPATH/src/go.mozilla.org/myproject
.
TravisCI has a directive to indicate the import path of your package, just add
go_import_path
to your .travis.yml
.
uage: go
1.5
1.6
tip
mport_path: go.mozilla.org/myproject
pt:
go test go.mozilla.org/myproject
As an AWS admin of the prod IAM, use this command:
s3 sync . s3://go.mozilla.org \
--exclude "README.md" --exclude ".git/*" \
--content-type "text/html" --acl public-read
Then invalidate the cloudfront cache
s cloudfront create-invalidation --distribution-id ESQYDMA17GDLC --paths '/*'