Skip to content

Commit 8b8f871

Browse files
authored
script adjustment (#8256)
1 parent 56ec5f8 commit 8b8f871

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-navigation",
3-
"version": "8.7.0",
3+
"version": "8.7.9",
44
"description": "React Native Navigation - truly native navigation for iOS and Android",
55
"license": "MIT",
66
"nativePackage": true,

scripts/release.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,31 @@ function readPackageJson() {
135135
}
136136

137137
function updatePackageJsonGit(version) {
138+
const prBranch = `ci/update-version-${version}`;
138139
exec.execSync(`git checkout ${BRANCH}`);
140+
exec.execSync(`git checkout -b ${prBranch}`);
139141
const packageJson = readPackageJson();
140142
packageJson.version = version;
141143
writePackageJson(packageJson);
142144
exec.execSync(`git add package.json`);
143145
exec.execSync(`git commit -m"Update package.json version to ${version} [buildkite skip]"`);
144-
exec.execSync(`git push deploy ${BRANCH}`);
146+
exec.execSync(`git push deploy ${prBranch}`);
147+
148+
const prData = JSON.stringify({
149+
title: `Update package.json version to ${version}`,
150+
head: prBranch,
151+
base: BRANCH,
152+
body: `Automated version bump to ${version} from CI release.`,
153+
});
154+
155+
cp.execSync(
156+
`curl -s -X POST ` +
157+
`-H "Authorization: token ${process.env.GIT_TOKEN}" ` +
158+
`-H "Content-Type: application/json" ` +
159+
`-d '${prData}' ` +
160+
`https://api.github.com/repos/wix/react-native-navigation/pulls`
161+
);
162+
145163
draftGitRelease(version);
146164
}
147165

0 commit comments

Comments
 (0)