Skip to content

Commit

Permalink
devops: fix publishing of @next packages to NPM (#3759)
Browse files Browse the repository at this point in the history
This patch:
- stop relying on stdout from `//packages/build_package.js` to get
output paths. This was a legacy code that's not needed anymore
- remove stray output from `//packages/build_package.js`
  • Loading branch information
aslushnikov authored Sep 3, 2020
1 parent 91671f5 commit 8b9be6b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
1 change: 0 additions & 1 deletion packages/build_package.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ if (!args.some(arg => arg === '--no-cleanup')) {

// 6. Bake commit SHA into the package
const commitSHA = spawnSync('git', ['rev-parse', 'HEAD'], {cwd: __dirname, encoding: 'utf8'});
console.log(commitSHA.stdout.trim());
await writeToPackage('commitinfo', commitSHA.stdout.trim());

// 7. Run npm pack
Expand Down
15 changes: 10 additions & 5 deletions utils/publish_all_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,16 @@ else
exit 1
fi

PLAYWRIGHT_TGZ="$(node ./packages/build_package.js playwright ./playwright.tgz)"
PLAYWRIGHT_CORE_TGZ="$(node ./packages/build_package.js playwright-core ./playwright-core.tgz)"
PLAYWRIGHT_WEBKIT_TGZ="$(node ./packages/build_package.js playwright-webkit ./playwright-webkit.tgz)"
PLAYWRIGHT_FIREFOX_TGZ="$(node ./packages/build_package.js playwright-firefox ./playwright-firefox.tgz)"
PLAYWRIGHT_CHROMIUM_TGZ="$(node ./packages/build_package.js playwright-chromium ./playwright-chromium.tgz)"
PLAYWRIGHT_TGZ="$PWD/playwright.tgz"
PLAYWRIGHT_CORE_TGZ="$PWD/playwright-core.tgz"
PLAYWRIGHT_WEBKIT_TGZ="$PWD/playwright-webkit.tgz"
PLAYWRIGHT_FIREFOX_TGZ="$PWD/playwright-firefox.tgz"
PLAYWRIGHT_CHROMIUM_TGZ="$PWD/playwright-chromium.tgz"
node ./packages/build_package.js playwright "${PLAYWRIGHT_TGZ}"
node ./packages/build_package.js playwright-core "${PLAYWRIGHT_CORE_TGZ}"
node ./packages/build_package.js playwright-webkit "${PLAYWRIGHT_WEBKIT_TGZ}"
node ./packages/build_package.js playwright-firefox "${PLAYWRIGHT_FIREFOX_TGZ}"
node ./packages/build_package.js playwright-chromium "${PLAYWRIGHT_CHROMIUM_TGZ}"

npm publish ${PLAYWRIGHT_TGZ} --tag="${NPM_PUBLISH_TAG}"
npm publish ${PLAYWRIGHT_CORE_TGZ} --tag="${NPM_PUBLISH_TAG}"
Expand Down

0 comments on commit 8b9be6b

Please sign in to comment.