Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@ on how to do that, including how to develop and test locally and the versioning

## Release Notes

### 6.2.0-SNAPSHOT
### 6.3.0-SNAPSHOT
*Released*: TBD
(Earliest compatible LabKey version: 25.2)

### 6.2.0
*Released*: 23 April, 2025
(Earliest compatible LabKey version: 25.2)
- Allow `PickDb` task to set server context path via `labkey.contextpath` property

### 6.1.0
*Released*: 10 January, 2025
(Earliest compatible LabKey version: 25.2)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependencies {
}

group = 'org.labkey.build'
project.version = "6.2.0-SNAPSHOT"
project.version = "6.3.0-SNAPSHOT"

gradlePlugin {
plugins {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ class TeamCityExtension
return getTeamCityProperty(project, "labkey.server", "http://localhost")
}

static String getLabKeyContextPath(Project project)
{
return getTeamCityProperty(project, "labkey.contextpath", null)
}

static String getLabKeyServerPort(Project project)
{
return getTeamCityProperty(project, 'tomcat.port', null)
Expand Down
9 changes: 9 additions & 0 deletions src/main/groovy/org/labkey/gradle/task/DoThenSetup.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ class DoThenSetup extends DefaultTask
"serverPort",
project.hasProperty("useSsl") ? "8443" : "8080"))

configProperties.setProperty("contextPath", tcPropOrDefault(project,
TeamCityExtension::getLabKeyContextPath,
"contextPath",
""))

configProperties.setProperty("shutdownPort", tcPropOrDefault(project,
TeamCityExtension::getLabKeyServerShutdownPort,
"shutdownPort",
Expand Down Expand Up @@ -102,6 +107,10 @@ class DoThenSetup extends DefaultTask
{
line = line.replace("#context.", "context.")
}
if (configProperties.containsKey("contextPath") && line.contains("=@@contextPath"))
{
line = line.replace("#context.", "context.")
}
if (line.startsWith("#")) {
return line // Don't apply replacements to comments
}
Expand Down