@@ -8,7 +8,7 @@ PureScript packages, and [Semantic Versioning 2.0.0][semver] for other languages
8
8
Most importantly, minor and patch changes must not include any breaking changes:
9
9
no entity is removed, and there's no change in type definitions and functionality
10
10
of preexisting exported entities. If any of this occurs, a major version must be
11
- bumped. Disregarding this rule can end up in breaking client package auto- updates.
11
+ bumped. Disregarding this rule can end up in breaking client package updates.
12
12
13
13
Any changes must be logged in ` CHANGELOG.md ` , which must comply with [ Keep A
14
14
Changelog] ( https://keepachangelog.com/en/1.1.0/ ) requirements. Each entry should
@@ -22,5 +22,59 @@ An example entry is below:
22
22
[#123](https://github.com/mlabs/plutus-ledger-api-rust/issues/123)
23
23
```
24
24
25
+ ## Release flow
26
+
27
+ In this repository we adopted a flow with multiple release branches, one for
28
+ each major version. This means that users of these packages can point to these
29
+ branches and use ` nix flake update ` without having to deal with breaking changes.
30
+ These branches must follow the pattern of ` v-MAJOR(.MAJOR) ` (` v1 ` , ` v2 ` etc. for
31
+ Semantic Versioning, or v1.0 for PVP).
32
+
33
+ Furthermore, release versions are pushed as ` git tags ` . The CI is configured to
34
+ execute some release tasks on tag push, such as bundling binaries, publish a
35
+ GitHub release, publish to package repository etc.
36
+
37
+ Stable versions should always be pushed to their respective release branches
38
+ in a reasonable schedule (weekly or monthly depending on the project).
39
+ In most cases this would also mean a release, which requires some additional
40
+ manual tasks:
41
+
42
+ 1 . bump versions in package manifest files (* .cabal, Cargo.toml, etc.)
43
+ 2 . update lock file if necessary
44
+ 3 . push git tag
45
+
46
+ ## Monorepo versioning policies
47
+
48
+ If a repository has multiple packages, these can evolve independently and
49
+ their release cycle could be different. To keep things consistent, we require
50
+ that major versions are aligned between packages on releases. If a package has
51
+ no major changes, it's unnecessary to release a new major version, but when it is
52
+ occasionally changed its major version must match the latest major version
53
+ in the repository, even if it requires skipping some versions.
54
+
55
+ The only exception to this rule is if a package is still in beta, in which case
56
+ a 0 major version can be used regardless of the other package versions.
57
+
58
+ If a Semantic Versioning and PVP are used simultaneously, the first major number
59
+ of PVP must always be 1 (or 0 if in a beta state).
60
+
61
+ Versioning policies when updating dependencies are well explained in the
62
+ [ PVP] [ pvp ] and [ Semver] [ semver ] documents, the same rules apply to dependencies
63
+ inside the same repository. In short, if a dependency update does not have any
64
+ effect on the public interface of the upstream package, it can be considered a
65
+ minor or patch release.
66
+
67
+ > As an example if we have three packages ` HaskellApp-v1.3.4.1 ` ,
68
+ > ` HaskellLib-v1.3.0.0 ` and ` RustApp-v0.1.0 ` , we could bump ` HaskellApp ` to ` 1.4.0.0 `
69
+ > without touching the other two if ` HaskellLib ` is unchanged. After this, when
70
+ > ` RustApp ` reaches a stable state, we must jump to ` 4.0.0 ` straight away, to align
71
+ > versions. Similarly, if ` HaskellLib ` is only updated after of ` HaskellApp `
72
+ > reached ` 1.5.0.0 ` , it must also jump to ` 1.5.0.0 ` .
73
+ >
74
+ > In another scenario, if we refactor ` HaskellLib ` and push a new major version
75
+ > ` 1.6.0.0 ` , while ` HaskellApp ` can update it's dependency of ` HaskellLib ` without
76
+ > changing its own public interface (e.g. CLI is completely unchanged), it's
77
+ > sufficient to do a minor (or patch) bump from ` 1.5.0.0 ` to ` 1.5.0.1 `
78
+
25
79
[ pvp ] : https://pvp.haskell.org/
26
80
[ semver ] : https://semver.org/
0 commit comments