Skip to content

Commit 76c6e9b

Browse files
committed
Document force-version
1 parent 1851bf4 commit 76c6e9b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,7 @@ Foliage also supports patches. Any file with `.patch` extension in
264264
sources.
265265

266266
Patches are applied very early in the process, and they can modify any file
267-
in the source tree. This means one could use a patch to define a new
268-
package version (by changing the version field in the cabal file).
267+
in the source tree.
269268

270269
Revisions are independent of patches, a patched cabal file will be subject
271270
to revisions just like the original cabal file.
@@ -274,6 +273,14 @@ to revisions just like the original cabal file.
274273
changes the content of the source distribution and the repository can only
275274
provide one source distribution for a given package name and version.
276275

276+
# New package versions
277+
278+
You can introduce new versions of existing packages by patching the cabal
279+
file. Foliage supports a short cut for this use case. If the package
280+
metadata file `<package>/<version>/meta.toml` includes the option
281+
`force-version = true`, then the version in the package cabal file will be
282+
overwritten with `<version>`. Notice this is done after applying patches.
283+
277284
## Author
278285

279286
- Andrea Bedini (@andreabedini)

0 commit comments

Comments
 (0)