Skip to content

Commit

Permalink
Fix artifact upload of OLD_RELEASE_NOTES.md
Browse files Browse the repository at this point in the history
  • Loading branch information
daviwil committed Feb 11, 2019
1 parent 2ac4bee commit 363741a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
9 changes: 0 additions & 9 deletions script/vsts/release-branch-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,3 @@ jobs:
ATOM_RELEASES_S3_BUCKET: $(ATOM_RELEASES_S3_BUCKET)
displayName: Upload CI Artifacts to S3
condition: and(succeeded(), eq(variables['IsSignedZipBranch'], 'true'))
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: $(Build.SourcesDirectory)/out/OLD_RELEASE_NOTES.md
ArtifactName: OLD_RELEASE_NOTES.md
ArtifactType: Container
displayName: Upload OLD_RELEASE_NOTES.md
condition: and(succeeded(), eq(variables['IsReleaseBranch'], 'true'))
continueOnError: true
6 changes: 5 additions & 1 deletion script/vsts/upload-artifacts.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict'

const fs = require('fs')
const os = require('os')
const path = require('path')
const glob = require('glob')
const publishRelease = require('publish-release')
Expand Down Expand Up @@ -65,9 +66,12 @@ async function uploadArtifacts () {

const oldReleaseNotes = releaseForVersion.releaseNotes
if (oldReleaseNotes) {
const oldReleaseNotesPath = path.resolve(CONFIG.buildOutputPath, 'OLD_RELEASE_NOTES.md')
const oldReleaseNotesPath = path.resolve(os.tmpdir(), 'OLD_RELEASE_NOTES.md')
console.log(`Saving existing ${releaseVersion} release notes to ${oldReleaseNotesPath}`)
fs.writeFileSync(oldReleaseNotesPath, oldReleaseNotes, 'utf8')

// This line instructs VSTS to upload the file as an artifact
console.log(`##vso[artifact.upload containerfolder=OldReleaseNotes;artifactname=OldReleaseNotes;]${oldReleaseNotesPath}`)
}

if (argv.createGithubRelease) {
Expand Down

0 comments on commit 363741a

Please sign in to comment.