ExternalURL returns a URL referencing the current Coder version. For production builds, this will link directly to a release. For development builds, this will link to a commit.
()
| 122 | // For production builds, this will link directly to a release. |
| 123 | // For development builds, this will link to a commit. |
| 124 | func ExternalURL() string { |
| 125 | readExternalURL.Do(func() { |
| 126 | repo := "https://github.com/coder/coder" |
| 127 | revision, valid := Revision() |
| 128 | if !valid { |
| 129 | externalURL = repo |
| 130 | return |
| 131 | } |
| 132 | externalURL = fmt.Sprintf("%s/commit/%s", repo, revision) |
| 133 | }) |
| 134 | return externalURL |
| 135 | } |
| 136 | |
| 137 | // Time returns when the Git revision was published. |
| 138 | func Time() (time.Time, bool) { |