Changeset 0.36.0 (#212)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -256,7 +256,7 @@
|
||||
<script src="https://unpkg.com/swagger-ui-dist@5/swagger-ui-bundle.js"></script>
|
||||
<script>
|
||||
SwaggerUIBundle({
|
||||
url: '/api/docs/openapi.yaml',
|
||||
url: window.location.pathname.replace(/\/$/, '') + '/openapi.yaml',
|
||||
dom_id: '#swagger-ui',
|
||||
deepLinking: true,
|
||||
presets: [SwaggerUIBundle.presets.apis, SwaggerUIBundle.SwaggerUIStandalonePreset],
|
||||
@@ -264,4 +264,4 @@
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -1,29 +1,3 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Version is set at build time via:
|
||||
//
|
||||
// go build -ldflags "-X main.Version=$(cat VERSION)"
|
||||
//
|
||||
// Falls back to reading /VERSION or ./VERSION for container/local runs
|
||||
// without ldflags. Final fallback is "dev".
|
||||
var Version = "dev"
|
||||
|
||||
func init() {
|
||||
if Version != "dev" {
|
||||
return
|
||||
}
|
||||
// Try well-known paths: container (/VERSION), repo root (../VERSION, ./VERSION)
|
||||
for _, path := range []string{"/VERSION", "VERSION", "../VERSION"} {
|
||||
if data, err := os.ReadFile(path); err == nil {
|
||||
if v := strings.TrimSpace(string(data)); v != "" {
|
||||
Version = v
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
const Version = "0.36.0"
|
||||
|
||||
Reference in New Issue
Block a user