Skip to content

Commit

Permalink
[1.x] Fix yarn build docs and update test
Browse files Browse the repository at this point in the history
yarn build flags in /src/dev/build/cli.ts are not updated to match
the renamed flags in de-couple PR (opensearch-project#795). This PR fixes the issue
and update the tests. Also modify words in DEVELOPER_GUIDE.md.

PR resolved:
opensearch-project#836

Backport PR:
opensearch-project#840

Signed-off-by: Anan Zhuang <[email protected]>
  • Loading branch information
ananzh committed Oct 5, 2021
1 parent caaa0ef commit 4e680e0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ access it.

### Building the artifacts

To build the archives for each platform, run the following:
To build the artifacts for all supported platforms, run the following:

```
yarn build --skip-os-packages
Expand Down
18 changes: 9 additions & 9 deletions src/dev/build/args.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ it('build dist for current platform, without packages, by default', () => {
`);
});

it('build dist for linux x64 platform, without packages, if --linux-x64 is passed', () => {
expect(readCliArgs(['node', 'scripts/build-platform'])).toMatchInlineSnapshot(`
it('build dist for linux x64 platform, without packages, if --linux is passed', () => {
expect(readCliArgs(['node', 'scripts/build-platform', '--linux'])).toMatchInlineSnapshot(`
Object {
"buildOptions": Object {
"createArchives": true,
Expand All @@ -81,7 +81,7 @@ it('build dist for linux x64 platform, without packages, if --linux-x64 is passe
"targetAllPlatforms": false,
"targetPlatforms": Object {
"darwin": false,
"linux": false,
"linux": true,
"linuxArm": false,
},
"versionQualifier": "",
Expand All @@ -93,8 +93,8 @@ it('build dist for linux x64 platform, without packages, if --linux-x64 is passe
`);
});

it('build dist for linux x64 platform, without packages, if --linux-arm64 is passed', () => {
expect(readCliArgs(['node', 'scripts/build-platform'])).toMatchInlineSnapshot(`
it('build dist for linux arm64 platform, without packages, if --linux-arm is passed', () => {
expect(readCliArgs(['node', 'scripts/build-platform', '--linux-arm'])).toMatchInlineSnapshot(`
Object {
"buildOptions": Object {
"createArchives": true,
Expand All @@ -108,7 +108,7 @@ it('build dist for linux x64 platform, without packages, if --linux-arm64 is pas
"targetPlatforms": Object {
"darwin": false,
"linux": false,
"linuxArm": false,
"linuxArm": true,
},
"versionQualifier": "",
},
Expand All @@ -119,8 +119,8 @@ it('build dist for linux x64 platform, without packages, if --linux-arm64 is pas
`);
});

it('build dist for linux x64 platform, without packages, if --darwin-x64 is passed', () => {
expect(readCliArgs(['node', 'scripts/build-platform'])).toMatchInlineSnapshot(`
it('build dist for darwin x64 platform, without packages, if --darwin is passed', () => {
expect(readCliArgs(['node', 'scripts/build-platform', '--darwin'])).toMatchInlineSnapshot(`
Object {
"buildOptions": Object {
"createArchives": true,
Expand All @@ -132,7 +132,7 @@ it('build dist for linux x64 platform, without packages, if --darwin-x64 is pass
"isRelease": false,
"targetAllPlatforms": false,
"targetPlatforms": Object {
"darwin": false,
"darwin": true,
"linux": false,
"linuxArm": false,
},
Expand Down
6 changes: 3 additions & 3 deletions src/dev/build/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ if (showHelp) {
--skip-archives {dim Don't produce tar/zip archives}
--skip-os-packages {dim Don't produce rpm/deb/docker packages}
--all-platforms {dim Produce archives for all platforms, not just this one}
--linux-x64 {dim Produce archives for only linux x64 platform}
--linux-arm64 {dim Produce archives for only linux arm64 platform}
--darwin-x64 {dim Produce archives for only darwin x64 platform}
--linux {dim Produce archives for only linux x64 platform}
--linux-arm {dim Produce archives for only linux arm64 platform}
--darwin {dim Produce archives for only darwin x64 platform}
--rpm {dim Only build the rpm package}
--deb {dim Only build the deb package}
--docker {dim Only build the docker image}
Expand Down

0 comments on commit 4e680e0

Please sign in to comment.