@@ -49,8 +49,8 @@ impl Config {
4949 _ =>"2.0K" . to_string ( ) ,
5050} ;
5151
52- let css_version =env_string_default ( "CSS_VERSION" , " ") ;
53- let js_version =env_string_default ( "JS_VERSION" , "1 ") ;
52+ let css_version =env ! ( "CSS_VERSION" ) ;
53+ let js_version =env ! ( "JS_VERSION" ) ;
5454
5555let css_extension =if dev_mode{
5656"css" . to_string ( )
@@ -66,7 +66,7 @@ impl Config {
6666Config {
6767 dev_mode,
6868database_url : env_string_default ( "DATABASE_URL" , "postgres:///pgml" ) ,
69- git_sha : env_string_required ( "GIT_SHA" ) ,
69+ git_sha : env ! ( "GIT_SHA" ) . to_string ( ) ,
7070sentry_dsn : env_string_optional ( "SENTRY_DSN" ) ,
7171static_dir : env_path_default ( "DASHBOARD_STATIC_DIRECTORY" , "static" ) ,
7272cms_dir : env_path_default ( "DASHBOARD_CMS_DIRECTORY" , "../pgml-cms" ) ,
@@ -92,7 +92,7 @@ pub fn database_url<'a>() -> &'a str {
9292& CONFIG . database_url
9393}
9494
95- pub fn git_sha < ' a > ( ) ->& ' a str {
95+ pub fn git_sha < ' a > ( ) ->& ' a String {
9696& CONFIG . git_sha
9797}
9898
@@ -150,12 +150,6 @@ fn env_is_set(name: &str) -> bool {
150150var ( name) . is_ok ( )
151151}
152152
153- fn env_string_required ( name : & str ) ->String {
154- var ( name)
155- . unwrap_or_else ( |_|panic ! ( "{} env variable is required for proper configuration" , name) )
156- . to_string ( )
157- }
158-
159153fn env_string_default ( name : & str , default : & str ) ->String {
160154match var ( name) {
161155Ok ( value) => value,