diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 012564d2..617f04af 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -64,3 +64,21 @@ jobs: inputs: testRunner: JUnit testResultsFiles: './junit.xml' + +- job: build + displayName: Build & Compile + condition: ne(variables['Build.Reason'], 'PullRequest') + dependsOn: + - php + - javascript + pool: + vmImage: 'Ubuntu-16.04' + steps: + - script: yarn + displayName: Install dependencies + - script: yarn release blessing-skin-server.zip + displayName: Generate package + - task: PublishPipelineArtifact@0 + inputs: + artifactName: 'Package file' + targetPath: 'blessing-skin-server.zip' diff --git a/scripts/zip.js b/scripts/zip.js index 93cc2699..99d2a2a5 100644 --- a/scripts/zip.js +++ b/scripts/zip.js @@ -6,7 +6,7 @@ module.exports = function () { const list = fs.readFileSync('./zip.txt', 'utf-8').split('\n'); list.pop(); // Remove the empty line - const output = fs.createWriteStream(`../blessing-skin-server-v${version}.zip`); + const output = fs.createWriteStream(process.argv[2] || `../blessing-skin-server-v${version}.zip`); const archive = archiver('zip', { zlib: { level: 9 } }); return new Promise((resolve, reject) => { @@ -34,3 +34,5 @@ module.exports = function () { archive.finalize(); }); }; + +module.exports();