Skip to content

Commit

Permalink
cleanup versions & add release checklist
Browse files Browse the repository at this point in the history
  • Loading branch information
letmaik committed May 15, 2020
1 parent 79cec48 commit 17ff221
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
19 changes: 19 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Release Checklist

- Decide on next version (following [CalVer](https://calver.org/)):
- Regular release: `YY.MM`, e.g. `20.05`
- Release candidate of regular release: `YY.MM-rcN`, e.g. `20.05-rc1`
- Patch release: `YY.MM.P`, e.g. `20.05.1`
- Release candidate of patch release: `YY.MM.P-rcN`, e.g. `20.05.1-rc1`
- Ensure `CHANGELOG.md` is up-to-date including version numbers
- If not, update and submit PR
- Create release branch `releases/<VERSION>` from development branch
- Update version in `VERSION`
- Commit and push
- Trigger the release CI pipeline (**TODO**)
- Wait for successful completion of pipeline
- `git tag <VERSION>` and `git push --tags`

If the release was a regular release:
- Switch to development branch
- Update version in `VERSION` to `YY.MM-dev` with expected next version number
5 changes: 3 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ CFLAGS_MAIN = -I$(OE_SDK_INCLUDES)
CFLAGS_ENCLAVE = -I$(OE_SDK_INCLUDES) -I${OE_SDK_INCLUDES}/openenclave/3rdparty -fPIE
LINK_MAIN =

GIT_VERSION = "$(shell git describe --dirty --always --tags || echo unknown)"
SGXLKL_VERSION = "$(shell cat ${SGXLKL_ROOT}/VERSION)"
SGXLKL_GIT_COMMIT = "$(shell git rev-parse --short HEAD || echo unknown)"
LKL_VERSION = "$(shell make --quiet -C ${SGXLKL_ROOT}/lkl kernelversion)"

CFLAGS_MAIN += $(SGXLKL_CFLAGS_EXTRA) -DGIT_VERSION=\"$(GIT_VERSION)\" -DLKL_VERSION=\"$(LKL_VERSION)\"
CFLAGS_MAIN += $(SGXLKL_CFLAGS_EXTRA) -DSGXLKL_VERSION=\"$(SGXLKL_VERSION)\" -DSGXLKL_GIT_COMMIT=\"$(SGXLKL_GIT_COMMIT)\" -DLKL_VERSION=\"$(LKL_VERSION)\"

# Copied from sgx-lkl-musl/config.mak after ./configure
# TODO: Do not hardcode cflags here
Expand Down
6 changes: 3 additions & 3 deletions src/main-oe/sgxlkl_run_oe.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#define BUILD_INFO "[NON-RELEASE build (-O3)]"
#endif

#define SGXLKL_INFO_STRING "SGX-LKL (OE) Git version %s LKL version %s %s"
#define SGXLKL_INFO_STRING "SGX-LKL (OE) %s (%s) LKL %s %s"
#define SGXLKL_LAUNCHER_NAME "sgx-lkl-run-oe"

// One first empty block for bootloaders, and offset in second block
Expand Down Expand Up @@ -108,7 +108,7 @@ __gdb_hook_starter_ready(void* base_addr, int mode, char* libsgxlkl_path)

static void version()
{
printf(SGXLKL_INFO_STRING, GIT_VERSION, LKL_VERSION, BUILD_INFO);
printf(SGXLKL_INFO_STRING, SGXLKL_VERSION, SGXLKL_GIT_COMMIT, LKL_VERSION, BUILD_INFO);
printf("\n");
}

Expand Down Expand Up @@ -1695,7 +1695,7 @@ int main(int argc, char* argv[], char* envp[])
}

sgxlkl_host_verbose(
SGXLKL_INFO_STRING, GIT_VERSION, LKL_VERSION, BUILD_INFO);
SGXLKL_INFO_STRING, SGXLKL_VERSION, SGXLKL_GIT_COMMIT, LKL_VERSION, BUILD_INFO);
sgxlkl_host_verbose_raw(
encl.mode == SW_DEBUG_MODE
? " [SOFTWARE DEBUG]\n"
Expand Down

0 comments on commit 17ff221

Please sign in to comment.