[ci:force][MIGRATION] - print-affected has been changed

This commit is contained in:
VitoAlbano 2024-08-16 00:11:24 +01:00
parent d1c410563e
commit a046562b28
4 changed files with 9 additions and 9 deletions

View File

@ -55,7 +55,7 @@ runs:
id: determine-affected
run: |
isAffected=false
affectedLibs=$(npx nx print-affected --type=lib --select=projects ${NX_CALCULATION_FLAGS} --plain)
affectedLibs=$(npx nx show projects --affected --type=lib --select=projects ${NX_CALCULATION_FLAGS} --plain)
if [[ $affectedLibs =~ "${{ inputs.e2e-test-id }}" ]]; then
isAffected=true
fi;

View File

@ -2,7 +2,7 @@ const core = require('@actions/core');
const exec = require('@actions/exec');
async function run() {
const base = core.getInput('base', {required: false }) || '5288597580';
const base = core.getInput('base', { required: false }) || '5288597580';
core.setOutput('affected_is_empty', 'true');
let affected = '';
@ -11,15 +11,15 @@ async function run() {
const options = {};
options.listeners = {
stdout: (data) => {
affected += data.toString()
},
affected += data.toString();
},
stderr: (data) => {
myError += data.toString();
}
};
await exec.exec(`npx nx print-affected --target=build --select=tasks.target.project --base=${base} --head=${head}`, [], options)
await exec.exec(`npx nx show projects --affected --target=build --select=tasks.target.project --base=${base} --head=${head}`, [], options);
const affectedTrimmed = affected.trim();
if (affectedTrimmed !== '') {
core.setOutput('affected_is_empty', 'false');
@ -29,4 +29,4 @@ async function run() {
core.setOutput('affected', affectedTrimmed);
}
run();
run();

View File

@ -208,7 +208,7 @@ jobs:
npx nx run js-api:bundle
npx nx run cli:bundle
npx nx run testing:bundle
- run: npx nx print-affected $NX_CALCULATION_FLAGS
- run: npx nx show projects --affected $NX_CALCULATION_FLAGS
- uses: ./.github/actions/upload-node-modules-and-artifacts
unit-tests:

View File

@ -11,7 +11,7 @@ if [ "${GITHUB_EVENT_NAME}" == "schedule" ]; then
exit 0
fi
isAffected=false
AFFECTED_LIBS=$(npx nx print-affected --type=lib --select=projects ${NX_CALCULATION_FLAGS} --plain)
AFFECTED_LIBS=$(npx nx show projects --affected --type=lib --select=projects ${NX_CALCULATION_FLAGS} --plain)
#echo "Verify if affected build contains $1"
#echo "Affected libs:$AFFECTED_LIBS"
if [[ $AFFECTED_LIBS =~ $verifyLib ]]; then