Skip to content

Commit

Permalink
Merge branch 'master' into stgum/contributing
Browse files Browse the repository at this point in the history
  • Loading branch information
Corina committed Nov 5, 2018
2 parents bc89c72 + 9b1c236 commit 58d1077
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 20 deletions.
45 changes: 26 additions & 19 deletions packages/app/main/gulpfile.linux.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,45 @@ gulp.task('package', async () => {
const builder = require('electron-builder');
const config = getConfig('linux');

console.log(`Electron mirror: ${getElectronMirrorUrl(getReleaseFilename)}`);
console.log(`Electron mirror: ${getElectronMirrorUrl()}`);

// create build artifacts
const filenames = await builder.build({
targets: builder.Platform.LINUX.createTarget(['deb', 'AppImage'], builder.Arch.ia32),
await builder.build({
targets: builder.Platform.LINUX.createTarget(
['AppImage'],
builder.Arch.ia32,
builder.Arch.x64
),
config
});

// rename and move the files to the /dist/ directory
await new Promise(resolve => {
gulp
.src(filenames, { allowEmpty: true })
.pipe(rename(path => {
path.basename = getReleaseFilename();
}))
.pipe(gulp.dest('./dist'))
.on('end', resolve);
});
});

/** Generates latest-linux.yml */
/** Generates latest-linux.yml & latest-linux-ia32.yml */
gulp.task('redist:metadata-only', async () => {
const { hashFileAsync, getReleaseFilename } = common;
const releaseFileName = `${getReleaseFilename()}.AppImage`;
const sha512 = await hashFileAsync(`./dist/${releaseFileName}`);
const releaseFileNameBase = getReleaseFilename();

const thirtyTwoBitReleaseFileName = `${releaseFileNameBase}-i386.AppImage`;
const thirtyTwoBitSha512 = await hashFileAsync(`./dist/${thirtyTwoBitReleaseFileName}`);

const sixtyFourBitReleaseFileName = `${releaseFileNameBase}-x86_64.AppImage`;
const sixtyFourBitSha512 = await hashFileAsync(`./dist/${sixtyFourBitReleaseFileName}`);

const releaseDate = new Date().toISOString();

writeYamlMetadataFile(
releaseFileName,
thirtyTwoBitReleaseFileName,
'latest-linux-ia32.yml',
'./dist',
sha512,
thirtyTwoBitSha512,
releaseDate
);

writeYamlMetadataFile(
sixtyFourBitReleaseFileName,
'latest-linux.yml',
'./dist',
sixtyFourBitSha512,
releaseDate
);
});
Expand Down
2 changes: 1 addition & 1 deletion packages/app/main/scripts/config/linux.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"linux": {
"artifactName": "BotFramework-Emulator-${version}-linux.${ext}",
"artifactName": "BotFramework-Emulator-${version}-linux-${arch}.${ext}",
"category": "Development"
}
}

0 comments on commit 58d1077

Please sign in to comment.