Skip to content

Commit

Permalink
chore(repo): allow nx version override for E2E tests (#10114)
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav committed May 3, 2022
1 parent 1fb99fe commit c1213b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion e2e/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const e2eCwd = `${e2eRoot}/${currentCli()}`;
ensureDirSync(e2eCwd);

let projName: string;
const publishedVersion = `9999.0.2`;
const publishedVersion = process.env.PUBLISHED_VERSION || `9999.0.2`;

export function uniq(prefix: string) {
return `${prefix}${Math.floor(Math.random() * 10000000)}`;
Expand Down
6 changes: 3 additions & 3 deletions scripts/e2e-build-package-publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from '../packages/workspace/src/utils/versions';
import { stripIndent } from 'nx/src/utils/logger';

process.env.PUBLISHED_VERSION = `9999.0.2`;
process.env.PUBLISHED_VERSION = process.env.PUBLISHED_VERSION || `9999.0.2`;
process.env.npm_config_registry = `http://localhost:4872`;
process.env.YARN_REGISTRY = process.env.npm_config_registry;

Expand All @@ -19,9 +19,9 @@ async function buildPackagePublishAndCleanPorts() {
Did you know that you can run the command with:
> NX_E2E_SKIP_BUILD_CLEANUP - saves time by reusing the previously built local packages
> CI - simulate the CI environment settings
If you change create-nx-workspace or create-nx-plugin, make sure to remove your npx cache.
Otherwise the changes won't be reflected in the tests.
Otherwise the changes won't be reflected in the tests.
\n`)
);
}
Expand Down

0 comments on commit c1213b6

Please sign in to comment.