File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 ,
Original file line number Diff line number Diff line change @@ -135,13 +135,31 @@ function readPackageJson() {
135135}
136136
137137function 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
You can’t perform that action at this time.
0 commit comments