You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That means in the parameters file the `application_version` variable will be created and updated on every version bump, you can change the name to anything you want by writing that in your config.yml file.
73
-
You may also specify a file other than `parameters.yml` if you would like to use a custom file. If so, make sure to import it in your config.yml file - you may want to use `ignore_errors` on the import
72
+
That means in the parameters file the `application_version` variable will be created and updated on every version bump, you can change the name to anything you want by writing that in your config.yaml file.
73
+
You may also specify a file other than `parameters.yaml` if you would like to use a custom file. If so, make sure to import it in your config.yaml file - you may want to use `ignore_errors` on the import
74
74
to avoid issues if the file does not yet exist.
75
75
76
76
```yaml
77
-
# app/config/config.yml
77
+
# app/config/config.yaml
78
78
imports:
79
-
- { resource: sem_var.yml, ignore_errors: true }
79
+
- { resource: sem_var.yaml, ignore_errors: true }
80
80
81
81
shivas_versioning:
82
-
version_file: sem_var.yml
82
+
version_file: sem_var.yaml
83
83
```
84
84
85
85
The default version formatter is `shivas_versioning.formatters.git`. This formatter shows the version from the Git tag and adds dev.commithash as a prerelease when not on the tag commit. If you want you can disable this formatter or create your own.
86
86
87
87
```yaml
88
-
# app/config/config.yml
88
+
# app/config/config.yaml
89
89
shivas_versioning:
90
90
version_formatter: ~
91
91
```
92
92
93
93
Displaying version
94
94
-
95
95
96
-
To display the version in the page title for example, you can add the following to your config.yml:
96
+
To display the version in the page title for example, you can add the following to your config.yaml:
97
97
```yaml
98
98
twig:
99
99
globals:
@@ -105,7 +105,7 @@ And then, in your Twig layout display it with the global variable:
105
105
<title>{{ app_version }}</title>
106
106
```
107
107
108
-
Alternatively, if you want to display the version automatically without having to bump it first, set `config.yml` to :
108
+
Alternatively, if you want to display the version automatically without having to bump it first, set `config.yaml` to :
0 commit comments