summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Fankhauser hiddenalpha.ch2024-09-16 17:24:24 +0200
committerAndreas Fankhauser hiddenalpha.ch2024-09-16 17:24:24 +0200
commitca18b01760938895528a447dfff499c3c0b45391 (patch)
treed5c4a96bff973e042e9a8c49a82ba867413c4858
parenta32fcdf4fca874326936ed0a6d4504f2a83fa5f7 (diff)
downloadUnspecifiedGarbage-ca18b01760938895528a447dfff499c3c0b45391.zip
UnspecifiedGarbage-ca18b01760938895528a447dfff499c3c0b45391.tar.gz
[SDCISA-15648] Adapt script to recent changes made in SDCISA-17349.
-rw-r--r--src/main/paisa-nonslim/foo.js93
-rw-r--r--src/main/paisa-nonslim/patches/rob.patch18
2 files changed, 76 insertions, 35 deletions
diff --git a/src/main/paisa-nonslim/foo.js b/src/main/paisa-nonslim/foo.js
index 64f72c4..7643129 100644
--- a/src/main/paisa-nonslim/foo.js
+++ b/src/main/paisa-nonslim/foo.js
@@ -268,6 +268,16 @@ Related:
}
+ function getJ21BranchNameByThingy( app, thingyName, onDone ){
+ var branchName = app.j21BranchesByThingyName[thingyName];
+ if( !branchName ){
+ onDone(Error("assert(j21BranchesByThingyName["+ thingyName +"] != NULL)"));
+ return;
+ }
+ onDone(null, branchName);
+ }
+
+
function getMangledPlatformVersion( app, onDone ){
if( app.mangledPlatformVersion != null ){
setTimeout(TODO_TRQCAEYoAgAbPQIA, 0, null, app.mangledPlatformVersion);
@@ -309,7 +319,7 @@ Related:
rsp.on("end", TODO_MRYCAOIzAgAKFQIA);
}
function TODO_MRYCAOIzAgAKFQIA(){
- var pat = new RegExp('\n<a href="(0.0.0-'+ app.issueKey +'-[^/]+-SNAPSHOT)/">[^<]+</a> +([0-9]{2})-([A-Za-z]{3})-([0-9]{4}) ([0-9]{2}):([0-9]{2}) +-', "g");
+ var pat = new RegExp('\n<a href="('+ app.versionPrefix +'[A-Za-z0-9]+-SNAPSHOT)/">[^<]+</a> +([0-9]{2})-([A-Za-z]{3})-([0-9]{4}) ([0-9]{2}):([0-9]{2}) +-', "g");
var latestVersion, latestDate;
rspBody.replace(pat, function( match, version, day, mthShrt, yr, hrs, mins, off, rspBody, groupNameMap ){
/* [FUCK those FUCKING DAMN bullshit formats!!!](https://xkcd.com/1179/) */
@@ -641,7 +651,7 @@ Related:
if( ex ) throw ex;
var child = child_process.spawn(
"mvn", ["versions:set", "-DgenerateBackupPoms=false", "-DallowSnapshots=true",
- "-DnewVersion="+ app.serviceSnapVersion],
+ "-DnewVersion="+ app.versionPrefix + app.serviceSnapVersion],
{ cwd: workdirOfSync(app, thingyName) },
);
child.on("error", console.error.bind(console));
@@ -772,18 +782,13 @@ Related:
function checkoutUpstreamDevelop( app, thingyName, onDone){
- var iRemoteName = 0;
- var iBranchName = 0;
checkout();
function checkout(){
- var remoteName = app.remoteNamesToTry[iRemoteName];
- var branchName = app.j21BranchesToTry[iBranchName++];
- if( branchName === undefined ){
- iBranchName = 0;
- iRemoteName += 1;
- checkout();
- return;
- }
+ getJ21BranchNameByThingy(app, thingyName, onBranchNameReady);
+ }
+ function onBranchNameReady( ex, branchName ){
+ if( ex ) throw ex;
+ var remoteName = app.remoteNamesToTry[0];
if( remoteName === undefined ){ onDone(Error("No more remotes/branches for "+ thingyName)); return; }
log.write("[DEBUG] git checkout "+ thingyName +" "+ remoteName +"/"+ branchName +"\n");
var child = child_process.spawn(
@@ -858,9 +863,9 @@ Related:
if( typeof onDone != "function" ) throw TypeError("onDone");
setVersion();
function setVersion(){
- log.write("[DEBUG] platform - mvn versions:set "+ app.platformSnapVersion +"\n");
+ log.write("[DEBUG] platform - mvn versions:set "+ app.versionPrefix + app.platformSnapVersion +"\n");
var child = child_process.spawn(
- "mvn", ["versions:set", "-DgenerateBackupPoms=false", "-DnewVersion="+app.platformSnapVersion],
+ "mvn", ["versions:set", "-DgenerateBackupPoms=false", "-DnewVersion="+ app.versionPrefix + app.platformSnapVersion],
{ cwd: workdirOfSync(app, "platform"), }
);
child.on("error", console.error.bind(console));
@@ -969,7 +974,6 @@ Related:
function resetHardToFirstAvailBranch( app, thingyName, onDone ){
var iRemoteName = 0;
- var iBranchName = 0;
if( typeof onDone !== "function" ) throw Error("onDone");
detach();
function detach(){
@@ -989,14 +993,16 @@ Related:
});
}
function tryResetHard(){
- var remoteName = app.remoteNamesToTry[iRemoteName];
- var branchName = app.j21BranchesToTry[iBranchName++];
+ getJ21BranchNameByThingy(app, thingyName, TODO_LmkAAORMAABZLwAA);
+ }
+ function TODO_LmkAAORMAABZLwAA( ex, branchName ){
+ if( ex ) throw ex;
if( branchName === undefined ){
iRemoteName += 1;
- iBranchName = 0;
tryResetHard();
return;
}
+ var remoteName = app.remoteNamesToTry[iRemoteName];
if( remoteName === undefined ){ onDone(Error("no usable remote/branch found")); return; }
log.write("[DEBUG] "+ thingyName +"$ git reset --hard "+ remoteName +"/"+ branchName +"\n");
var child = child_process.spawn(
@@ -1145,8 +1151,45 @@ Related:
isPrintIsaVersion: false,
isPrintBaselineVersion: false,
remoteNamesToTry: ["origin"],
- j21BranchesToTry: ["SDCISA-15636-Migrate-to-Java-21", "java-21",
- "SDCISA-13957-platform-Java-21", "SDCISA-13957-Java-21-update-spring"],
+ j21BranchesByThingyName: {
+ "platform": "java-21",
+ "allitnil": "SDCISA-15636-Migrate-to-Java-21",
+ "babelfish": "SDCISA-15636-Migrate-to-Java-21",
+ "barman": "SDCISA-13957-platform-Java-21",
+ "benjy": "SDCISA-15636-Migrate-to-Java-21",
+ "bentstick": "SDCISA-15636-Migrate-to-Java-21",
+ "blart": "SDCISA-15636-Migrate-to-Java-21",
+ "captain": "SDCISA-15636-Migrate-to-Java-21",
+ "caveman": "SDCISA-15636-Migrate-to-Java-21",
+ "colin": "SDCISA-15636-Migrate-to-Java-21",
+ "deep": "SDCISA-15636-Migrate-to-Java-21",
+ "drdan": "SDCISA-15636-Migrate-to-Java-21",
+ "guide": "SDCISA-15636-Migrate-to-Java-21",
+ "heimdall": "SDCISA-15636-Migrate-to-Java-21",
+ "hooli": "SDCISA-13957-platform-Java-21",
+ "jeltz": "SDCISA-13957-platform-Java-21",
+ "kwaltz": "SDCISA-15636-Migrate-to-Java-21",
+ "loon": "SDCISA-15636-Migrate-to-Java-21",
+ "magician": "SDCISA-15636-Migrate-to-Java-21",
+ "megacamel": "SDCISA-15636-Migrate-to-Java-21",
+ "minetti": "SDCISA-15636-Migrate-to-Java-21",
+ "mown": "SDCISA-15636-Migrate-to-Java-21",
+ "nowwhat": "SDCISA-13957-platform-Java-21",
+ "pobble": "SDCISA-15636-Migrate-to-Java-21",
+ "poodoo": "SDCISA-15636-Migrate-to-Java-21",
+ "prosser": "SDCISA-15636-Migrate-to-Java-21",
+ "rob": "SDCISA-15636-Migrate-to-Java-21",
+ "slarti": "SDCISA-13957-platform-Java-21",
+ "streetmentioner": "SDCISA-15636-Migrate-to-Java-21",
+ "thor": "SDCISA-15636-Migrate-to-Java-21",
+ "towel": "SDCISA-15636-Migrate-to-Java-21",
+ "trillian": "SDCISA-15636-Migrate-to-Java-21",
+ "vannharl": "SDCISA-15636-Migrate-to-Java-21",
+ "vogon": "SDCISA-15636-Migrate-to-Java-21",
+ "vroom": "SDCISA-15636-Migrate-to-Java-21",
+ "zaphake": "SDCISA-13957-platform-Java-21",
+ "zem": "SDCISA-15636-Migrate-to-Java-21",
+ },
workdir: "C:/work/tmp/SlimPkg-Repos",
maxParallel: 1,
numRunningTasks: 0,
@@ -1154,13 +1197,13 @@ Related:
issueKey: "SDCISA-15648",
branchName: null,
commitMsg: null,
- platformSnapVersion: "0.0.0-SNAPSHOT",
- serviceSnapVersion: "0.0.0-SNAPSHOT",
- parentVersion: null,
+ versionPrefix: "U0RdSVNB", /* const part of generated seq above (MUST have for find version later) */
+ /* generate: {printf '%s-SNAPSHOT\n' "$(dev-urandom -c 42|base64|tr -d '/+='|head -c8)"} */
+ platformSnapVersion: "ol4AAD0s-SNAPSHOT",
+ serviceSnapVersion: "ol4AAD0s-SNAPSHOT",
};
- app.branchName = app.issueKey +"-RemoveSlimPackaging-n1";
+ app.branchName = app.issueKey +"-RemoveSlimPackaging-n2";
app.commitMsg = "["+ app.issueKey +"] Remove slim packaging";
- app.parentVersion = "0.0.0-"+ app.branchName +"-SNAPSHOT";
if( parseArgs(process.argv, app) !== 0 ){ process.exit(1); }
if( app.isHelp ){ printHelp(); return; }
run(app);
diff --git a/src/main/paisa-nonslim/patches/rob.patch b/src/main/paisa-nonslim/patches/rob.patch
index bc0576e..4d3472b 100644
--- a/src/main/paisa-nonslim/patches/rob.patch
+++ b/src/main/paisa-nonslim/patches/rob.patch
@@ -20,17 +20,17 @@
testInstance: [
services: [
eagle: [version: '02.01.26.01-PR-379-SNAPSHOT'],
-- platform: [version: '03.06.38.01-PR-388-SNAPSHOT'],
+- platform: [version: '03.06.40.01-PR-388-SNAPSHOT'],
+ platform: [version: '${j21.platform.version}'],
storage: [version: '00.24.00.00'],
rob: [version: '%currentBranch%'],
-- slarti: [version: '03.15.09.01-PR-1019-SNAPSHOT'],
+- slarti: [version: '03.15.12.01-PR-1019-SNAPSHOT'],
+ slarti: [version: '${j21.slarti.mangledVersion}'],
-- captain: [version: '03.00.14.01-PR-103-SNAPSHOT'],
+- captain: [version: '03.00.15.01-PR-103-SNAPSHOT'],
+ captain: [version: '${j21.captain.mangledVersion}'],
hafas: [version: '5.41.SBB.4.15.8'],
- nova: [version: '14.166.1-new-idp'],
- 'data-nova': [version: '14.166.0.20230524-1305.P.P.3267.0'],
+ nova: [version: '14.183.1'],
+ 'data-nova': [version: '14.183.0.20240731-1209.P.P.9238.0'],
--- a/Jenkinsfile
@@ -48,7 +48,7 @@
<groupId>ch.post.it.paisa.service</groupId>
<!-- Caution: when changing the parent version number, also change the
platform.version below -->
-- <version>03.06.38.01-PR-388-SNAPSHOT</version>
+- <version>03.06.40.01-PR-388-SNAPSHOT</version>
+ <version>${j21.platform.version}</version>
<relativePath/>
</parent>
@@ -78,15 +78,13 @@
--- a/pom.xml
+++ a/pom.xml
-@@ -328,8 +333,10 @@
+@@ -328,7 +333,7 @@
If changing one version, also change the other.
Don't forget to change the version in the manifest.yaml, too. -->
<linti.version>03.13.17.00</linti.version>
-- <slarti.version>03.15.09.01-PR-1019-SNAPSHOT</slarti.version>
+- <slarti.version>03.15.10.00</slarti.version>
+ <slarti.version>${j21.slarti.mangledVersion}</slarti.version>
<webjars.angular.sanitize.version>1.8.3</webjars.angular.sanitize.version>
-+ <jakarta.annotation.version>3.0.0</jakarta.annotation.version> <!-- TODO probably move this version somewhere else? -->
-+ <jakarta.servlet.version>6.1.0</jakarta.servlet.version> <!-- TODO probably move this version somewhere else? -->
</properties>
<modules>