Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): fix packaging of the segment key INTELLIJ-148 #110

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kmruiz
Copy link
Contributor

@kmruiz kmruiz commented Dec 10, 2024

Description

Checklist

Open Questions

@kmruiz kmruiz self-assigned this Dec 10, 2024
@github-actions github-actions bot added the fix Fixes a bug. label Dec 10, 2024
Copy link

Coverage Report

There is no coverage information present for the Files changed

Copy link
Contributor

@nirinchev nirinchev left a comment

Choose a reason for hiding this comment

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

Minor question, otherwise looks reasonable.

property("segmentApiKey", System.getenv("BUILD_SEGMENT_API_KEY") ?: "<none>")
destinationFile.set(project.layout.projectDirectory.file("src/main/resources/build.properties"))
property("pluginVersion", rootProject.version)
property("segmentApiKey", System.getenv("BUILD_SEGMENT_API_KEY") ?: "<none>")
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we fail the build here - otherwise if we misconfigure the build environment, we can end up with a bundle without a segment key.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True, that is exactly what happened tbf when we modernised the build configuration with jetbrains best practices.

The thing is that we want to be able to build a version without access to segment. Ideally, we will enable Segment only in "main" and disable segment in the "beta" channel. We need to think more about this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps we fail the build if that environment variable is not present and we set it to "" for beta/local builds?

@@ -120,12 +120,14 @@ jmhReport {
}

tasks {
register("buildProperties", WriteProperties::class) {
group = "build"
if (pluginBundle.enableBundle.get() == true) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this condition checking?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants