Skip to content

Conversation

@vector-of-bool
Copy link
Contributor

This changeset ensures most of the build shell scripts execute cleanly in Bash with "strict mode." Several environment variables used by the scripts are given default empty values in setup-env.sh. The "create packages" script was moved out-of-line from config.yml and placed in a dedicated file to allow for braced shell substitutions without EVG expansions interfering. The behavior of the scripts is otherwise unchanged.

@vector-of-bool vector-of-bool requested a review from kevinAlbs July 28, 2022 18:45
Copy link
Contributor

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, LGTM. Thank you for the cleanup.

The "create packages" script was moved out-of-line from config.yml and placed in a dedicated file to allow for braced shell substitutions without EVG expansions interfering.

That seems helpful. It makes it simpler to run the script locally as well.

Copy link
Contributor

@rcsanchez97 rcsanchez97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with the one minor nit about the indentation and with this additional change to README.md:

diff --git a/README.md b/README.md
index e6e3742..8892402 100644
--- a/README.md
+++ b/README.md
@@ -116,7 +116,7 @@ Do the following when releasing:
 - Update CHANGELOG.md with any new changes and update the `[Unreleased]` text to the version being released.
 - If this is a new minor release (e.g. `x.y.0`):
    - Update the Linux distribution package installation instructions in the below sections to refer to the new version x.y.
-   - Update the release branch references (i.e., `-DRELEASE_BRANCH_REF=origin/rx.y`) in the invocations of `GetVersion.cmake` (currently located in `CMakeLists.txt`, `.evergreen/debian_package_build.sh`, and `.evergreen/config.yml`) so that they refer to the new branch you are about to create
+   - Update the release branch references (i.e., `-DRELEASE_BRANCH_REF=origin/rx.y`) in the invocations of `GetVersion.cmake` (currently located in `CMakeLists.txt`, `.evergreen/debian_package_build.sh`, `.evergreen/create-packages-and-repos.sh`, and `.evergreen/config.yml`) so that they refer to the new branch you are about to create
    - Commit these changes (on `master`) so that both the `master` branch and the new branch you are about to create refer to the new branch (note that this means you will commit changes to this file, `CHANGELOG.md`, and the files which contain invocations of `GetVersion.cmake`)
    - Create a branch named `rx.y`.
    - Update the [libmongocrypt-release](https://evergreen.mongodb.com/projects##libmongocrypt-release) Evergreen project to set `Branch Name` to `rx.y`.

"PACKAGER_DISTRO=${packager_distro}" \
"PACKAGER_ARCH=${packager_arch}" \
${compile_env|} \
bash libmongocrypt/.evergreen/create-packages-and-repos.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trivial: the indentation looks a little off here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation is intentionally strange here because it's all a single env <vars> <cmd> command, and the whitespacing is meant to emphasize it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it definitely jumped out at me, so mission accomplished! 🤣

"PACKAGER_DISTRO=${packager_distro}" \
"PACKAGER_ARCH=${packager_arch}" \
${compile_env|} \
bash libmongocrypt/.evergreen/create-packages-and-repos.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trivial: the indentation looks a little off here.

@vector-of-bool vector-of-bool merged commit 867b979 into mongodb:master Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants