File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 11package constants
22
3+ var VERSION = "0.0.1"
4+
35const (
46 // Envstore identifier
57 // StringStore string store identifier
@@ -13,8 +15,6 @@ const (
1315 EnvKeyEnv = "ENV"
1416 // EnvKeyEnvPath key for cli arg variable ENV_PATH
1517 EnvKeyEnvPath = "ENV_PATH"
16- // EnvKeyVersion key for build arg version
17- EnvKeyVersion = "VERSION"
1818 // EnvKeyAuthorizerURL key for env variable AUTHORIZER_URL
1919 // TODO: remove support AUTHORIZER_URL env
2020 EnvKeyAuthorizerURL = "AUTHORIZER_URL"
Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ func main() {
2121 envstore .ARG_ENV_FILE = flag .String ("env_file" , "" , "Env file path" )
2222 flag .Parse ()
2323
24- envstore .EnvStoreObj .UpdateEnvVariable (constants .StringStoreIdentifier , constants .EnvKeyVersion , VERSION )
24+ log .Println ("=> version:" , VERSION )
25+ constants .VERSION = VERSION
2526
2627 // initialize required envs (mainly db & env file path)
2728 err := env .InitRequiredEnv ()
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ func TestResolvers(t *testing.T) {
1515 // constants.DbTypeArangodb: "http://localhost:8529",
1616 // constants.DbTypeMongodb: "mongodb://localhost:27017",
1717 }
18- envstore . EnvStoreObj . UpdateEnvVariable ( constants . StringStoreIdentifier , constants . EnvKeyVersion , "test" )
18+
1919 for dbType , dbURL := range databases {
2020 s := testSetup ()
2121 envstore .EnvStoreObj .UpdateEnvVariable (constants .StringStoreIdentifier , constants .EnvKeyDatabaseURL , dbURL )
Original file line number Diff line number Diff line change 99// GetMeta helps in getting the meta data about the deployment from EnvData
1010func GetMetaInfo () model.Meta {
1111 return model.Meta {
12- Version : envstore . EnvStoreObj . GetStringStoreEnvVariable ( constants .EnvKeyVersion ) ,
12+ Version : constants .VERSION ,
1313 ClientID : envstore .EnvStoreObj .GetStringStoreEnvVariable (constants .EnvKeyClientID ),
1414 IsGoogleLoginEnabled : envstore .EnvStoreObj .GetStringStoreEnvVariable (constants .EnvKeyGoogleClientID ) != "" && envstore .EnvStoreObj .GetStringStoreEnvVariable (constants .EnvKeyGoogleClientSecret ) != "" ,
1515 IsGithubLoginEnabled : envstore .EnvStoreObj .GetStringStoreEnvVariable (constants .EnvKeyGithubClientID ) != "" && envstore .EnvStoreObj .GetStringStoreEnvVariable (constants .EnvKeyGithubClientSecret ) != "" ,
You can’t perform that action at this time.
0 commit comments