mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
Fixes #2213 This will allow us to fetch the actual Firezone version that's in use from within the language runtimes themselves without resorting to an external mechanism to do so. This is useful in connlib for example when selecting the Portal API to use with `X-Firezone-API-Version`, and useful in log printing. Since platforms enforce semantic version, I propose the convention: `1.20231001.34` where MAJOR is `1` for Firezone 1.0, MINOR is our API version, and PATCH is the release of that API version that is published on the repo. Given this system, publishing a release would consist of: 1. Edit `Makefile` to set the patch and minor versions appropriately depending on whether there are breaking portal API changes. 2. `make version` 3. `git add .; git commit; git push` -- this opens a PR with the new version numbers. In this PR we can discuss whether to stop-ship or go. 4. PR merged, release is drafted and deployed to staging with the new tag and version numbers 5. build artifacts are uploaded to drafted release, everything is tagged and versioned appropriately without having to introduce another commit 6. If all looks good, publish release
15 lines
1.0 KiB
Makefile
15 lines
1.0 KiB
Makefile
# Format:
|
|
# MAJOR: This is "1" for now. Don't change it.
|
|
# MINOR: This is the current version of the portal API in YYYYMMDD format. Consumers (connlib, REST) will request
|
|
# this API from the portal with the X-Firezone-API-Version request header.
|
|
# PATCH: Increment this each time you want to publish a new Firezone version.
|
|
version = 1.20231001.0
|
|
|
|
version:
|
|
@find elixir/ -name "mix.exs" -exec sed -i '' -e '/mark:automatic-version/{n;s/[0-9]*\.[0-9]*\.[0-9]*/$(version)/;}' {} \;
|
|
@find rust/ -name "Cargo.toml" -exec sed -i '' -e '/mark:automatic-version/{n;s/[0-9]*\.[0-9]*\.[0-9]*/$(version)/;}' {} \;
|
|
@find .github/ -name "*.yml" -exec sed -i '' -e '/mark:automatic-version/{n;s/[0-9]*\.[0-9]*\.[0-9]*/$(version)/;}' {} \;
|
|
@find swift/ -name "project.pbxproj" -exec sed -i '' -e 's/MARKETING_VERSION = .*;/MARKETING_VERSION = $(version);/' {} \;
|
|
@find kotlin/ -name "build.gradle.kts" -exec sed -i '' -e '/mark:automatic-version/{n;s/versionName =.*/versionName = "$(version)"/;}' {} \;
|
|
@cd rust && cargo check
|