Skip to content

Commit

Permalink
update sg/sg refs to point to sourcegraph-public-snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
burmudar committed Aug 27, 2024
1 parent 12bcd9d commit 1885adc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ The templates use [Go-style HTML templates](https://golang.org/pkg/html/template
See the following examples:

- [about.sourcegraph.com/handbook templates](https://github.com/sourcegraph/about/tree/master/_resources/templates)
- [docs.sourcegraph.com templates](https://github.com/sourcegraph/sourcegraph/tree/main/doc/_resources/templates)
- [docs.sourcegraph.com templates](https://github.com/sourcegraph/sourcegraph-public-snapshot/tree/main/doc/_resources/templates)

### Redirects

Expand Down Expand Up @@ -110,7 +110,7 @@ The `docsite` tool requires site data to be available in any of the following wa
```
- In the `DOCSITE_CONFIG` env var, using Zip archive URLs for `templates`, `assets`, and `content`, as in the following example:
```
DOCSITE_CONFIG='{"templates":"https://codeload.github.com/sourcegraph/sourcegraph/zip/refs/heads/main#*/doc/_resources/templates/","assets":"https://codeload.github.com/sourcegraph/sourcegraph/zip/refs/heads/main#*/doc/_resources/assets/","content":"https://codeload.github.com/sourcegraph/sourcegraph/zip/refs/heads/$VERSION#*/doc/","baseURLPath":"/","assetsBaseURLPath":"/assets/","defaultContentBranch":"main"}' docsite serve
DOCSITE_CONFIG='{"templates":"https://codeload.github.com/sourcegraph/sourcegraph-public-snapshot/zip/refs/heads/main#*/doc/_resources/templates/","assets":"https://codeload.github.com/sourcegraph/sourcegraph/zip/refs/heads/main#*/doc/_resources/assets/","content":"https://codeload.github.com/sourcegraph/sourcegraph/zip/refs/heads/$VERSION#*/doc/","baseURLPath":"/","assetsBaseURLPath":"/assets/","defaultContentBranch":"main"}' docsite serve
```

## Development
Expand Down
4 changes: 2 additions & 2 deletions cmd/docsite/site.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func addRedirectsFromAssets(site *docsite.Site) error {

const (
DEBUG = false
CODEHOST_URL = "https://codeload.github.com/sourcegraph/sourcegraph/zip/refs/heads/$VERSION#*/doc/"
CODEHOST_URL = "https://codeload.github.com/sourcegraph/sourcegraph-public-snapshot/zip/refs/heads/$VERSION#*/doc/"
)

// openDocsiteFromConfig reads the documentation site data from a docsite.json file. All file system
Expand Down Expand Up @@ -324,7 +324,7 @@ func (fs *versionedFileSystemURL) fetchAndCacheVersion(version string) (http.Fil
}
urlStr = strings.Replace(fs.url, "$VERSION", version, -1)

// HACK: Workaround for https://github.com/sourcegraph/sourcegraph/issues/3030. This assumes
// HACK: Workaround for https://github.com/sourcegraph/sourcegraph-public-snapshot/issues/3030. This assumes
// that tags all begin with "vN" where N is some number.
if len(version) >= 2 && version[0] == 'v' && unicode.IsDigit(rune(version[1])) {
urlStr = strings.Replace(urlStr, "refs/heads/", "refs/tags/", 1)
Expand Down

0 comments on commit 1885adc

Please sign in to comment.