mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Add develop branch releases and display version tag (#216)
* Add releases for develop branch. Show version tag * Pass version tag to cross-compile
This commit is contained in:
@@ -108,9 +108,10 @@ func (r *queryResolver) Stats(ctx context.Context) (*models.StatsResultType, err
|
||||
}
|
||||
|
||||
func (r *queryResolver) Version(ctx context.Context) (*models.Version, error) {
|
||||
hash, buildtime := GetVersion()
|
||||
version, hash, buildtime := GetVersion()
|
||||
|
||||
return &models.Version{
|
||||
Version: &version,
|
||||
Hash: hash,
|
||||
BuildTime: buildtime,
|
||||
}, nil
|
||||
@@ -173,7 +174,7 @@ func (r *queryResolver) ScrapeFreeonesPerformerList(ctx context.Context, query s
|
||||
// method determines if it was omitted altogether.
|
||||
func wasFieldIncluded(ctx context.Context, field string) bool {
|
||||
rctx := graphql.GetRequestContext(ctx)
|
||||
|
||||
|
||||
_, ret := rctx.Variables[field]
|
||||
return ret
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import (
|
||||
"github.com/stashapp/stash/pkg/utils"
|
||||
)
|
||||
|
||||
var version string = ""
|
||||
var buildstamp string = ""
|
||||
var githash string = ""
|
||||
|
||||
@@ -67,7 +68,7 @@ func Start() {
|
||||
setupUIBox = packr.New("Setup UI Box", "../../ui/setup")
|
||||
|
||||
initialiseImages()
|
||||
|
||||
|
||||
r := chi.NewRouter()
|
||||
|
||||
r.Use(authenticateHandler())
|
||||
@@ -112,7 +113,7 @@ func Start() {
|
||||
if !config.GetCSSEnabled() {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
// search for custom.css in current directory, then $HOME/.stash
|
||||
fn := config.GetCSSPath()
|
||||
exists, _ := utils.FileExists(fn)
|
||||
@@ -224,11 +225,15 @@ func Start() {
|
||||
}
|
||||
|
||||
func printVersion() {
|
||||
fmt.Printf("stash version: %s (%s)\n", githash, buildstamp)
|
||||
versionString := githash
|
||||
if version != "" {
|
||||
versionString = version + " (" + versionString + ")"
|
||||
}
|
||||
fmt.Printf("stash version: %s - %s\n", versionString, buildstamp)
|
||||
}
|
||||
|
||||
func GetVersion() (string, string) {
|
||||
return githash, buildstamp
|
||||
func GetVersion() (string, string, string) {
|
||||
return version, githash, buildstamp
|
||||
}
|
||||
|
||||
func makeTLSConfig() *tls.Config {
|
||||
|
||||
Reference in New Issue
Block a user