@genesislcap/blank-app-seed 3.29.1-prerelease.3 → 3.29.1-prerelease.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.genx/package.json +1 -1
- package/.genx/scripts/update-versions.js +45 -15
- package/.genx/versions.json +2 -2
- package/.github/workflows/slack.yml +1 -1
- package/.github/workflows/upgrade.yml +6 -1
- package/.github/workflows/upgrade_prerelease.yml +1 -0
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
package/.genx/package.json
CHANGED
|
@@ -4,23 +4,30 @@ const { resolve } = require('node:path');
|
|
|
4
4
|
const current = require('../versions.json');
|
|
5
5
|
|
|
6
6
|
const args = process.argv.slice(2);
|
|
7
|
-
const patchOnly = args.indexOf("--patch-only") >= 0;
|
|
8
|
-
const dryRun = args.indexOf("--dry-run") >= 0;
|
|
9
7
|
|
|
10
|
-
const
|
|
8
|
+
const argDefined = (name) => args.indexOf(name) >= 0;
|
|
9
|
+
|
|
10
|
+
const patchOnly = argDefined("--patch-only");
|
|
11
|
+
const dryRun = argDefined("--dry-run");
|
|
12
|
+
const skipServer = argDefined("--skip-server");
|
|
11
13
|
|
|
12
|
-
const
|
|
14
|
+
const VERSION_REGEX = /\d+$/;
|
|
15
|
+
const JFROG_BASE_EXCLUSIONS = '*-SNAPSHOT*;*maven-metadata*;*test*;*TEST*';
|
|
13
16
|
|
|
14
|
-
const
|
|
17
|
+
const { jfrogVersionMatcher, jfrogExclusionsMatcher, npmVersionMatcher } = patchOnly
|
|
18
|
+
? { jfrogVersionMatcher: current.GSF.replace(VERSION_REGEX, '*'), jfrogExclusionsMatcher: `*-beta*;*-RC*;${JFROG_BASE_EXCLUSIONS}`, npmVersionMatcher: current.UI.replace(VERSION_REGEX, 'x') }
|
|
19
|
+
: { jfrogVersionMatcher: undefined, jfrogExclusionsMatcher: JFROG_BASE_EXCLUSIONS, npmVersionMatcher: 'latest' };
|
|
15
20
|
|
|
16
|
-
console.log('Running with: ', {patchOnly, dryRun, npmVersionMatcher, jfrogVersionMatcher})
|
|
21
|
+
console.log('Running with: ', { patchOnly, skipServer, dryRun, npmVersionMatcher, jfrogVersionMatcher, jfrogExclusionsMatcher });
|
|
17
22
|
|
|
18
|
-
const run = (command) =>
|
|
19
|
-
|
|
23
|
+
const run = (command) => {
|
|
24
|
+
console.debug('running:', command);
|
|
25
|
+
return execSync(command, {
|
|
20
26
|
stdio: ['pipe', 'pipe', 'ignore'],
|
|
21
27
|
})
|
|
22
28
|
.toString('utf8')
|
|
23
29
|
.trim();
|
|
30
|
+
};
|
|
24
31
|
|
|
25
32
|
const writeJSON = (json, path) => {
|
|
26
33
|
const data = JSON.stringify(json, null, 2) + '\n';
|
|
@@ -32,15 +39,38 @@ const writeJSON = (json, path) => {
|
|
|
32
39
|
}
|
|
33
40
|
};
|
|
34
41
|
|
|
35
|
-
|
|
42
|
+
/**
|
|
43
|
+
* NPM Info returns a string if there's only one version in the channel;, otherwise it returns a valid json array,
|
|
44
|
+
* where the most recent version will be the last value;
|
|
45
|
+
* @param {*} output
|
|
46
|
+
* @returns
|
|
47
|
+
*/
|
|
48
|
+
const parseNpmInfo = (output) => {
|
|
49
|
+
try {
|
|
50
|
+
const versions = JSON.parse(output);
|
|
51
|
+
return Array.isArray(versions) ? versions[versions.length-1] : versions;
|
|
52
|
+
} catch (err) {
|
|
53
|
+
return output;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const npmInfo = run(`npm info @genesislcap/foundation-ui@${npmVersionMatcher} version --json`);
|
|
58
|
+
console.debug('Npm raw output:', npmInfo);
|
|
59
|
+
const UI = parseNpmInfo(npmInfo);
|
|
60
|
+
|
|
61
|
+
const serverOsCommandPipeline = `grep path | tr -s ' ' | sed 's/"path": //g' | awk -F'/' '{print $(NF-1)}' | sort -V | tail -n 1`;
|
|
36
62
|
|
|
37
|
-
const GSF =
|
|
38
|
-
|
|
39
|
-
|
|
63
|
+
const { GSF, Auth } = skipServer
|
|
64
|
+
? { GSF: current.GSF, Auth: current.Auth }
|
|
65
|
+
: {
|
|
66
|
+
GSF: run(
|
|
67
|
+
`jf rt s "libs-release-client/global/genesis/genesis-distribution/${jfrogVersionMatcher ?? ''}" --exclusions="${jfrogExclusionsMatcher}" | ${serverOsCommandPipeline}`
|
|
68
|
+
),
|
|
69
|
+
Auth: run(
|
|
70
|
+
`jf rt s "libs-release-client/global/genesis/auth-distribution/${jfrogVersionMatcher ?? ''}" --exclusions="${jfrogExclusionsMatcher}" | ${serverOsCommandPipeline}`,
|
|
71
|
+
)
|
|
72
|
+
};
|
|
40
73
|
|
|
41
|
-
const Auth = run(
|
|
42
|
-
`jf rt s "libs-release-client/global/genesis/auth-distribution/${jfrogVersionMatcher ?? ''}" --exclusions="*-RC*;*-SNAPSHOT*;*maven-metadata*;*test*;*TEST*" | grep path | tr -s ' ' | sed 's/"path": //g' | awk -F'/' '{print $(NF-1)}' | sort -V | tail -n 1`,
|
|
43
|
-
);
|
|
44
74
|
const latest = { UI, GSF, Auth };
|
|
45
75
|
|
|
46
76
|
console.log('Current:', current);
|
package/.genx/versions.json
CHANGED
|
@@ -11,6 +11,10 @@ on:
|
|
|
11
11
|
type: boolean
|
|
12
12
|
required: false
|
|
13
13
|
description: Only update if there are newer patch versions
|
|
14
|
+
skip-server:
|
|
15
|
+
type: boolean
|
|
16
|
+
required: false
|
|
17
|
+
description: Skip updating server dependencies
|
|
14
18
|
secrets:
|
|
15
19
|
GH_USER_TOKEN:
|
|
16
20
|
required: true
|
|
@@ -26,6 +30,7 @@ jobs:
|
|
|
26
30
|
env:
|
|
27
31
|
BRANCH: ${{ inputs.branch }}
|
|
28
32
|
PATCH_ARG: ${{ inputs.patch-only && '--patch-only' || '' }}
|
|
33
|
+
SKIP_SERVER_ARG: ${{ inputs.skip-server && '--skip-server' || '' }}
|
|
29
34
|
steps:
|
|
30
35
|
- uses: actions/checkout@v4
|
|
31
36
|
with:
|
|
@@ -47,7 +52,7 @@ jobs:
|
|
|
47
52
|
jfrog config add --artifactory-url="https://genesisglobal.jfrog.io/artifactory" --user="${{ secrets.JFROG_LIBS_RELEASE_CLIENT_RO_USER }}" --password="${{ secrets.JFROG_LIBS_RELEASE_CLIENT_RO_KEY }}" --interactive=false
|
|
48
53
|
|
|
49
54
|
- name: Update to latest versions if available
|
|
50
|
-
run: node .genx/scripts/update-versions ${PATCH_ARG}
|
|
55
|
+
run: node .genx/scripts/update-versions ${PATCH_ARG} ${SKIP_SERVER_ARG}
|
|
51
56
|
|
|
52
57
|
- name: Check for changes
|
|
53
58
|
id: versions
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.29.1-prerelease.4](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.29.1-prerelease.3...v3.29.1-prerelease.4) (2024-08-16)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) 872539b
|
|
9
|
+
|
|
3
10
|
## [3.29.1-prerelease.3](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.29.1-prerelease.2...v3.29.1-prerelease.3) (2024-08-15)
|
|
4
11
|
|
|
5
12
|
|