Skip to content

Commit

Permalink
[CI] Pick CI fixes from main (#2004)
Browse files Browse the repository at this point in the history
  • Loading branch information
Saadnajmi authored Dec 28, 2023
1 parent 184bc75 commit 31557f8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
3 changes: 3 additions & 0 deletions packages/community-cli-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,8 @@
},
"engines": {
"node": ">=18"
},
"beachball": {
"shouldPublish": false
}
}
2 changes: 1 addition & 1 deletion packages/virtualized-lists/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@react-native-mac/virtualized-lists",
"version": "0.73.3",
"description": "Virtualized lists for React Native.",
"description": "Virtualized lists for React Native macOS.",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
19 changes: 18 additions & 1 deletion scripts/npm-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,23 @@ const {
getCurrentCommit,
isTaggedLatest,
} = require('./scm-utils');
const path = require('path'); // [macOS]
const fs = require('fs'); // [macOS]

// [macOS] Function to get our version from package.json instead of the CircleCI build tag.
function getPkgJsonVersion() {
const RN_PACKAGE_DIRECTORY = path.resolve(
__dirname,
'..',
'packages',
'react-native',
);
const pkgJsonPath = path.resolve(RN_PACKAGE_DIRECTORY, 'package.json');
const pkgJson = JSON.parse(fs.readFileSync(pkgJsonPath, 'utf8'));
const pkgJsonVersion = pkgJson.version;
return pkgJsonVersion;
}
// macOS]

// Get `next` version from npm and +1 on the minor for `main` version
function getMainVersion() {
Expand Down Expand Up @@ -48,7 +65,7 @@ function getNpmInfo(buildType) {
}

const {version, major, minor, prerelease} = parseVersion(
process.env.CIRCLE_TAG,
getPkgJsonVersion(), // [macOS] We can't use the CircleCI build tag, so we use the version argument instead.
buildType,
);

Expand Down

0 comments on commit 31557f8

Please sign in to comment.