Skip to content

Commit

Permalink
feat(core): fix publishing script
Browse files Browse the repository at this point in the history
  • Loading branch information
Cammisuli authored and FrozenPandaz committed Jan 30, 2023
1 parent 95921c3 commit 6a6eb9f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/nx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"scripts": {
"postinstall": "node ./bin/compute-project-graph",
"prepublishOnly": "napi prepublishOnly --skip-gh-release --prefix ./native-packages"
"prepublishOnly": "napi prepublish --skip-gh-release --prefix ./native-packages"
},
"keywords": [
"Monorepo",
Expand Down
3 changes: 2 additions & 1 deletion scripts/copy-local-native.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const glob = require('fast-glob');

const p = process.argv[2];

if (process.env.LOCAL_RELEASE) {
// Only copy the .node binaries when it is a local release
if (!process.env.LOCAL_RELEASE) {
process.exit(0);
}

Expand Down
5 changes: 3 additions & 2 deletions scripts/nx-release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import { parse } from 'semver';
import * as version from '@lerna/version/index';
import * as publish from '@lerna/publish/index';

const lernaJsonPath = join(__dirname, '../lerna.json');
const originalLernaJson = readFileSync(lernaJsonPath);

function hideFromGitIndex(uncommittedFiles: string[]) {
execSync(`git update-index --assume-unchanged ${uncommittedFiles.join(' ')}`);

Expand Down Expand Up @@ -235,8 +238,6 @@ function parseArgs() {
return parsedArgs;
}

const lernaJsonPath = join(__dirname, '../lerna.json');
const originalLernaJson = readFileSync(lernaJsonPath);
function updateLernaJsonVersion(version: string) {
const json = JSON.parse(readFileSync(lernaJsonPath).toString());

Expand Down

0 comments on commit 6a6eb9f

Please sign in to comment.