-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,12 +120,14 @@ jmhReport { | |
} | ||
|
||
tasks { | ||
register("buildProperties", WriteProperties::class) { | ||
group = "build" | ||
if (pluginBundle.enableBundle.get() == true) { | ||
register("buildProperties", WriteProperties::class) { | ||
group = "build" | ||
|
||
destinationFile.set(project.layout.projectDirectory.file("src/main/resources/build.properties")) | ||
property("pluginVersion", rootProject.version) | ||
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>") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? |
||
} | ||
} | ||
|
||
named("test", Test::class) { | ||
|
@@ -204,8 +206,10 @@ tasks { | |
version.set(libs.versions.intellij.remoteRobot) | ||
} | ||
|
||
withType<ProcessResources> { | ||
dependsOn("buildProperties") | ||
if (pluginBundle.enableBundle.get() == true) { | ||
withType<ProcessResources> { | ||
dependsOn("buildProperties") | ||
} | ||
} | ||
|
||
patchPluginXml { | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
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?