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

Obtain AEMaaCS SDK version from /system/console/productinfo #71

Merged
merged 1 commit into from
Aug 15, 2024
Merged
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
8 changes: 6 additions & 2 deletions update-aem-deps.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,12 @@ def readAemUrl(relativeUrl) {

// reads the AEM version from locale AEM instance and finds the matching AEM SDK version in the maven repository
def resolveAemSdkVersion() {
// PLEASE NOTE: this works only when a valid 'license.properties' is located beneath the quickstart JAR file
def aemVersion = (readAemUrl('/system/console/status-productinfo.txt') =~ /Adobe Experience Manager \((.*)\)/)[0][1]
def productInfoUrl = '/system/console/productinfo'
def aemVersionMatcher = (readAemUrl(productInfoUrl) =~ /Adobe Experience Manager \((.*)\)/)
if (!aemVersionMatcher) {
throw new RuntimeException('Adobe Experience Manager version not present in product info from ' + productInfoUrl)
}
def aemVersion = aemVersionMatcher[0][1]

// need to transform from a AEM version like '2020.4.2793.20200403T195013Z' to '2020.04.2793.20200403T195013Z-200130'
def versionPattern = Pattern.compile(aemVersion.replaceAll('\\.','.*') + '-.*')
Expand Down