11//! This module contains the configuration of `postgrestools.jsonc`
22//!
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".
54
65pub mod analyser;
76pub mod database;
@@ -34,6 +33,7 @@ use files::{FilesConfiguration, PartialFilesConfiguration, partial_files_configu
3433use migrations:: {
3534 MigrationsConfiguration , PartialMigrationsConfiguration , partial_migrations_configuration,
3635} ;
36+ use pgt_env:: PGT_WEBSITE ;
3737use plpgsql_check:: {
3838 PartialPlPgSqlCheckConfiguration , PlPgSqlCheckConfiguration ,
3939 partial_pl_pg_sql_check_configuration,
@@ -44,10 +44,7 @@ pub use typecheck::{
4444} ;
4545use vcs:: VcsClientKind ;
4646
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 ;
5148
5249/// The configuration that is contained inside the configuration file.
5350#[ derive( Clone , Debug , Default , Deserialize , Eq , Partial , PartialEq , Serialize ) ]
@@ -106,7 +103,7 @@ impl PartialConfiguration {
106103 /// Returns the initial configuration.
107104 pub fn init ( ) -> Self {
108105 Self {
109- schema : Some ( format ! ( "https://pgtools.dev/ schemas/{VERSION}/schema.json" ) ) ,
106+ schema : Some ( format ! ( "{}/ schemas/{VERSION}/schema.json" , PGT_WEBSITE ) ) ,
110107 extends : Some ( StringSet :: default ( ) ) ,
111108 files : Some ( PartialFilesConfiguration {
112109 ignore : Some ( Default :: default ( ) ) ,
0 commit comments