1
1
//! This module contains the configuration of `postgrestools.jsonc`
2
2
//!
3
- //! The configuration is divided by "tool", and then it's possible to further customise it
4
- //! by language. The language might further options divided by tool.
3
+ //! The configuration is divided by "tool".
5
4
6
5
pub mod analyser;
7
6
pub mod database;
@@ -34,6 +33,7 @@ use files::{FilesConfiguration, PartialFilesConfiguration, partial_files_configu
34
33
use migrations:: {
35
34
MigrationsConfiguration , PartialMigrationsConfiguration , partial_migrations_configuration,
36
35
} ;
36
+ use pgt_env:: PGT_WEBSITE ;
37
37
use plpgsql_check:: {
38
38
PartialPlPgSqlCheckConfiguration , PlPgSqlCheckConfiguration ,
39
39
partial_pl_pg_sql_check_configuration,
@@ -44,10 +44,7 @@ pub use typecheck::{
44
44
} ;
45
45
use vcs:: VcsClientKind ;
46
46
47
- pub const VERSION : & str = match option_env ! ( "PGT_VERSION" ) {
48
- Some ( version) => version,
49
- None => "0.0.0" ,
50
- } ;
47
+ pub use pgt_env:: VERSION ;
51
48
52
49
/// The configuration that is contained inside the configuration file.
53
50
#[ derive( Clone , Debug , Default , Deserialize , Eq , Partial , PartialEq , Serialize ) ]
@@ -106,7 +103,7 @@ impl PartialConfiguration {
106
103
/// Returns the initial configuration.
107
104
pub fn init ( ) -> Self {
108
105
Self {
109
- schema : Some ( format ! ( "https://pgtools.dev/ schemas/{VERSION}/schema.json" ) ) ,
106
+ schema : Some ( format ! ( "{}/ schemas/{VERSION}/schema.json" , PGT_WEBSITE ) ) ,
110
107
extends : Some ( StringSet :: default ( ) ) ,
111
108
files : Some ( PartialFilesConfiguration {
112
109
ignore : Some ( Default :: default ( ) ) ,
0 commit comments