Skip to content

Commit b43e05f

Browse files
authored
Update scripts.md
1 parent 1fe8e1a commit b43e05f

1 file changed

Lines changed: 16 additions & 10 deletions

File tree

docs/scripts.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Shell Scripts
22

3-
``` {program} update-version.sh
3+
```
4+
{program} update-version.sh
45
```
56

67
## update-version.sh
@@ -11,7 +12,8 @@ This file can be run from your own repository locally, and it's also used in som
1112

1213
### Usage
1314

14-
```{object} update-version.sh [-g (true|false)] [-d (true|false)] VERSION_STRING TEMPLATE_EXTENSION [FILES]
15+
```
16+
{object} update-version.sh [-g (true|false)] [-d (true|false)] VERSION_STRING TEMPLATE_EXTENSION [FILES]
1517
```
1618
Example:
1719
`update-version.sh 1.2.3.4 .vtxt AssemblyInfo.cs.vtxt`
@@ -21,32 +23,37 @@ Example template files:
2123
* [AssemblyInfo.cs from RasterPropMonitor](https://github.com/JonnyOThan/RasterPropMonitor/blob/master/SharedAssemblyInfo.cs.versiontemplate)
2224
* [.version file from RasterPropMonitor](https://github.com/JonnyOThan/RasterPropMonitor/blob/master/GameData/JSI/RasterPropMonitor/RasterPropMonitor.version.versiontemplate)
2325

24-
```{option} VERSION_STRING
26+
```
27+
{option} VERSION_STRING
2528
**Required**
2629
2730
This is the new version you want to set, in MAJOR.MINOR.PATCH.BUILD form. Any of the values can be omitted (starting from the right).
2831
```
2932

30-
```{option} TEMPLATE_EXTENSION
33+
```
34+
{option} TEMPLATE_EXTENSION
3135
**Optional.** Default: `.versiontemplate`
3236
3337
This is a file extension that indicates which files the script should consider. When processing a file, if it ends with this extension then the script will store the output in a new file with the template extension removed. Otherwise the file is updated in-place.
3438
```
3539

36-
```{option} FILES
40+
```
41+
{option} FILES
3742
**Optional.**
3843
3944
This is a list of files to process. If omitted, the script will process all files in the subtree that end with
4045
`TEMPLATE_EXTENSION`.
4146
```
4247

43-
```{option} -g (true|false)
48+
```
49+
{option} -g (true|false)
4450
**Optional.** Default: false
4551
4652
If true, calls `git add` on each of the modified files (but does not commit).
4753
```
4854

49-
```{option} -d (true|false)
55+
```
56+
{option} -d (true|false)
5057
**Optional.** Default: false
5158
5259
If true, deletes the template file after processing (if the file was not updated in-place).
@@ -57,9 +64,8 @@ If true, deletes the template file after processing (if the file was not updated
5764
The script will replace the following tokens in processed files:
5865

5966
* `@VERSION_STRING@` : replaced with the raw `VERSION_STRING`
60-
* `@VERSION_FULL@` : replaced with `VERSION_MAJOR.VERSION_MINOR.VERSION_PATCH.VERSION_BUILD`. That is, it is
61-
`VERSION_STRING` with all non-digit characters removed
67+
* `@VERSION_FULL@` : replaced with `VERSION_MAJOR.VERSION_MINOR.VERSION_PATCH.VERSION_BUILD`. That is, it is `VERSION_STRING` with all non-digit characters removed
6268
* `@VERSION_MAJOR@` : replaced with the major version number
6369
* `@VERSION_MINOR@` : replaced with the minor version number
6470
* `@VERSION_PATCH@` : replaced with the patch version number
65-
* `@VERSION_BUILD@` : replaced with the build version number
71+
* `@VERSION_BUILD@` : replaced with the build version number

0 commit comments

Comments
 (0)