Skip to content

Commit

Permalink
Fixing the release notes being restored before uploaded + git config
Browse files Browse the repository at this point in the history
  • 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.
13 changes: 8 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -303,6 +306,7 @@ pipeline {
script {
copyReleaseNotes(versionBefore, nextVersion)
}

// Create a draft release on GitHub
script {
withCredentials([
Expand All @@ -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'
Expand Down

0 comments on commit bc025ed

Please sign in to comment.