There are two types of packages in this repo:
- The
@elastic/ecs-helpers
utility package that is used by the others, and - the
@elastic/ecs-[...]-format
packages for supported logging frameworks that are meant to be used by end users.
The ecs-helpers utility is versioned, released, and tagged independently from the others.
Assuming "x.y.z" is the release version:
- Choose the appropriate version number according to semver.
- Create a PR that:
- bumps the "version" in "packages/ecs-helpers/package.json",
- updates "packages/ecs-helpers/CHANGELOG.md", if necessary, and
- is named something like "release @elastic/[email protected]", if the PR is only about doing the release. (If this PR is also related to other changes, then the commit/PR title should include mention of those things as well.)
- Get the PR approved and merged.
- Tag the commit as follows, in a git clone with the merged commit:
git tag ecs-helpers-vx.y.z git push origin ecs-helpers-vx.y.z
- Publish to npm, in a clean git clone:
git status # this should show "working tree clean" cd packages/ecs-helpers npm publish
-
Choose the appropriate version number. All
ecs-*-format
packages currently coordinate their versions. That means that if "1.2.3" is the current latest release of any those packages, then the next release version of any of them is after that. Usegit tag -l
to list current versions.For example, if the latest versions are [email protected] and [email protected], and a new release only for ecs-morgan-format is being done, then the next version should be:
1.2.4
for a patch-level release,1.3.0
for a minor-level release, or2.0.0
for a major-level release
This is a bit weird for some cases, but allows use to have a simple
vx.y.z
tag for referring to the source code for any published release. -
Create a PR that:
- bumps the "version" in "packages/ecs-[...]-format/package.json",
- updates "packages/ecs-[...]-format/CHANGELOG.md", if necessary, and
- is named something like "release vx.y.z" if all format packages are being released or "release @elastic/[email protected]" if just one of them is being released. (If this PR is also related to other changes, then the commit/PR title should include mention of those things as well.)
-
Get the PR approved and merged.
-
Tag the commit as follows, in a git clone with the merged commit:
git tag vx.y.z git push origin vx.y.z
-
Publish to npm, in a clean git clone:
git status # this should show "working tree clean" # for each of the packages being released: cd packages/ecs-...-format npm publish