-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing the release notes being restored before uploaded + git config
- Loading branch information
Kræn Hansen
committed
Feb 28, 2019
1 parent
0c90b21
commit bc025ed
Showing
1 changed file
with
8 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,8 +54,6 @@ def copyReleaseNotes(versionBefore, versionAfter) { | |
file: 'CHANGELOG.md', | ||
text: "# Release ${versionAfter.substring(1)} (${today})\n\n${releaseNotes}\n\n${changeLog}", | ||
) | ||
// Restore the release notes from the template | ||
sh 'cp docs/RELEASENOTES.template.md RELEASENOTES.md' | ||
} | ||
|
||
def testExampleApp(String app) { | ||
|
@@ -119,6 +117,11 @@ pipeline { | |
url: '[email protected]:realm/react-realm-context.git' | ||
]] | ||
]) | ||
|
||
// Set the email and name used when committing | ||
sh 'git config --global user.email "[email protected]"' | ||
sh 'git config --global user.name "Jenkins CI"' | ||
|
||
// Setting the TAG_NAME env as this is not happening when skipping default checkout. | ||
script { | ||
env.TAG_NAME = sh( | ||
|
@@ -303,6 +306,7 @@ pipeline { | |
script { | ||
copyReleaseNotes(versionBefore, nextVersion) | ||
} | ||
|
||
// Create a draft release on GitHub | ||
script { | ||
withCredentials([ | ||
|
@@ -312,9 +316,8 @@ pipeline { | |
} | ||
} | ||
|
||
// Set the email and name used when committing | ||
sh 'git config --global user.email "[email protected]"' | ||
sh 'git config --global user.name "Jenkins CI"' | ||
// Restore the release notes from the template | ||
sh 'cp docs/RELEASENOTES.template.md RELEASENOTES.md' | ||
|
||
// Stage the updates to the files, commit and tag the commit | ||
sh 'git add package.json package-lock.json CHANGELOG.md RELEASENOTES.md' | ||
|