-
Notifications
You must be signed in to change notification settings - Fork 13
[friction] support for local dev-channel deploy #340
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
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 |
|---|---|---|
|
|
@@ -45,8 +45,14 @@ intellijPlatform { | |
| val datestamp = DateTimeFormatter.ofPattern("yyyyMMdd").format(LocalDate.now()) | ||
| val baseVersion = "$nextMajorVersion.0.0-dev.$datestamp" | ||
|
|
||
| val commitHash = System.getenv("KOKORO_GIT_COMMIT") | ||
| version = if (commitHash != null) "$baseVersion-${commitHash.take(7)}" else baseVersion | ||
| val commitHash = System.getenv("KOKORO_GIT_COMMIT") ?: try { | ||
| providers.exec { | ||
| commandLine("git", "rev-parse", "--short", "HEAD") | ||
| }.standardOutput.asText.get().trim() | ||
| } catch (e: Exception) { | ||
| "" | ||
| } | ||
| version = if (commitHash.isNotEmpty()) "$baseVersion-${commitHash.take(7)}" else baseVersion | ||
| } else { | ||
| version = providers.gradleProperty("pluginVersion") | ||
|
Member
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. This would be for a follow up, but it's confusing that there's a pluginVersion in gradle.properties too (and there's a TODO there to get it from changelog similar to for the dev version. Maybe change that soon since you're working on versioning already..
Collaborator
Author
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. Let's discuss. I'm happy to make any changes to get this more clear. Thanks! |
||
| } | ||
|
|
@@ -255,8 +261,16 @@ tasks.register("printCompileClasspath") { | |
| } | ||
| } | ||
|
|
||
| tasks.register("printVersion") { | ||
| doLast { | ||
| println(intellijPlatform.pluginConfiguration.version.get()) | ||
| abstract class PrintVersionTask : org.gradle.api.DefaultTask() { | ||
|
Member
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. I don't follow how this task is used - is it only to check the version?
Collaborator
Author
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. Yep. |
||
| @get:org.gradle.api.tasks.Input | ||
| abstract val pluginVersion: org.gradle.api.provider.Property<String> | ||
|
|
||
| @org.gradle.api.tasks.TaskAction | ||
| fun action() { | ||
| println(pluginVersion.get()) | ||
| } | ||
| } | ||
|
|
||
| tasks.register<PrintVersionTask>("printVersion") { | ||
| pluginVersion.set(intellijPlatform.pluginConfiguration.version) | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.