Skip to content

Commit 054b234

Browse files
authored
ci(0.76): only create .rnm-publish sentinel file if versioning happened (#2686)
Backport #2682
1 parent 9ea49c3 commit 054b234

File tree

4 files changed

+23
-18
lines changed

4 files changed

+23
-18
lines changed

.ado/scripts/xcodebuild.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ if ! command -v xcbeautify 1> /dev/null; then
7070
brew install xcbeautify
7171
fi
7272

73+
xcodebuild -downloadAllPlatforms
74+
7375
eval "$build_cmd" | xcbeautify --report junit
7476

7577
if [[ "$CCACHE_DISABLE" != "1" ]]; then

.ado/templates/apple-tools-setup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
steps:
22
- task: UseNode@1
33
inputs:
4-
version: '23.x'
4+
versionSpec: '22.x'
55

66
- script: |
77
brew bundle --file .ado/Brewfile

.ado/variables/vars.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
variables:
22
VmImageApple: macos-latest-internal
3-
xcode_friendly_name: 'Xcode 15.2'
4-
xcode_version: '/Applications/Xcode_15.2.app'
5-
ios_version: '17.2'
6-
ios_simulator: 'iPhone 15'
3+
xcode_friendly_name: 'Xcode 16.2'
4+
xcode_version: '/Applications/Xcode_16.2.app'
5+
ios_version: '18.0'
6+
ios_simulator: 'iPhone 16'

packages/nx-release-version/index.js

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,22 +76,25 @@ const afterAllProjectsVersioned = async (cwd, opts) => {
7676
const changedFiles = [...baseResult.changedFiles];
7777
const deletedFiles = [...baseResult.deletedFiles];
7878

79-
try {
80-
// Create the .rnm-publish file to indicate versioning has occurred
81-
fs.writeFileSync(path.join(REPO_ROOT, '.rnm-publish'), '');
79+
// Only update React Native artifacts if versioning actually happened
80+
if (changedFiles.length > 0) {
81+
try {
82+
// Create the .rnm-publish file to indicate versioning has occurred
83+
fs.writeFileSync(path.join(REPO_ROOT, '.rnm-publish'), '');
8284

83-
// Update React Native artifacts
84-
const versionedFiles = await runSetVersion();
85+
// Update React Native artifacts
86+
const versionedFiles = await runSetVersion();
8587

86-
// Add the versioned files to changed files
87-
changedFiles.push(...versionedFiles);
88+
// Add the versioned files to changed files
89+
changedFiles.push(...versionedFiles);
8890

89-
console.log('✅ Updated React Native artifacts');
90-
console.table(versionedFiles.map(file => path.relative(REPO_ROOT, file)));
91-
} catch (error) {
92-
const errorMessage = error instanceof Error ? error.message : String(error);
93-
console.error(`❌ Failed to update React Native artifacts: ${errorMessage}`);
94-
throw error;
91+
console.log('✅ Updated React Native artifacts');
92+
console.table(versionedFiles.map(file => path.relative(REPO_ROOT, file)));
93+
} catch (error) {
94+
const errorMessage = error instanceof Error ? error.message : String(error);
95+
console.error(`❌ Failed to update React Native artifacts: ${errorMessage}`);
96+
throw error;
97+
}
9598
}
9699

97100
return {

0 commit comments

Comments
 (0)