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
Copy file name to clipboardExpand all lines: README.md
+61-2Lines changed: 61 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,6 +112,66 @@ Options:
112
112
-h, --help Show help [boolean]
113
113
```
114
114
115
+
116
+
### Version naming conventions
117
+
118
+
Craft currently supports [semantic versioning (semver)](https://semver.org)-like versions for the `NEW-VERSION` argument passed to its `prepare` and `publish` commands. This means, releases made with craft need to follow a general pattern as follows:
- The `<major>`, `<minor>` and `<patch>` numbers are required
125
+
- The `<prerelease>` and `<build>` identifiers are optional
126
+
127
+
#### Preview releases (`<prerelease>`)
128
+
129
+
Preview or pre-release identifiers **must** include one of the following identifiers
130
+
131
+
```txt
132
+
preview|pre|rc|dev|alpha|beta|unstable|a|b
133
+
```
134
+
135
+
and may additionally include incremental pre-release version numbers.
136
+
Adding identifiers other than the ones listed above result in Craft either rejecting the release (if not parse-able) or the release being treated by individual targets as a stable release.
137
+
138
+
Examples:
139
+
140
+
```txt
141
+
1.0.0-preview
142
+
1.0.0-alpha.0
143
+
1.0.0-beta.1
144
+
1.0.0-rc.20
145
+
1.0.0-a
146
+
147
+
// invalid or incorrectly treated
148
+
1.0.0-foo
149
+
1.0.0-canary.0
150
+
```
151
+
152
+
#### Special Case: Python Post Releases
153
+
154
+
155
+
Python has the concept of post releases, which craft handles implicitly. A post release is indicated by a `-\d+` suffix to the semver version, for example: `1.0.0-1`.
156
+
Given that we only consider certain identifiers as [pre-releases](#preview-releases-prerelease), post releases are considered stable releases.
157
+
158
+
### Build identifiers (`<build>`)
159
+
160
+
Craft supports adding a build identifier to your version, for example if you release the same package version for different platforms or architectures.
161
+
You can also combine build and pre-release identifiers but in this case, the pre-release identifier has to come first.
162
+
163
+
Examples:
164
+
165
+
```txt
166
+
// valid
167
+
1.0.0+x86_64
168
+
1.0.0-rc.1+x86_64
169
+
170
+
// invalid or incorrectly treated
171
+
1.0.0+rc.1+x86_64
172
+
1.0.0+x86_64-beta.0
173
+
```
174
+
115
175
## Caveats
116
176
117
177
- When interacting with remote GitHub repositories, `craft` uses the
@@ -519,8 +579,7 @@ changelog. Otherwise, defaults to the tag name and tag's commit message.
519
579
520
580
If `previewReleases` is set to `true` (which is the default), the release
521
581
created on GitHub will be marked as a pre-release version if the release name
522
-
contains any one of `preview`, `pre`, `rc`, `dev`,`alpha`, `beta`, `unstable`,
523
-
`a`, or `b`.
582
+
contains any one of [pre-release identifiers](#preview-releases-prerelease).
0 commit comments