1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-24 08:12:24 +02:00

Tools: Allow creating multiple Android releases

This commit is contained in:
Laurent Cozic 2019-07-28 18:33:48 +02:00
parent fcfee36c8c
commit 0e6190b42b

View File

@ -135,6 +135,7 @@ async function createRelease(name, tagName, version) {
return {
downloadUrl: downloadUrl,
apkFilename: apkFilename,
apkFilePath: apkFilePath,
};
}
@ -166,15 +167,15 @@ async function main() {
console.info('Creating GitHub release ' + tagName + '...');
const oauthToken = await githubOauthToken();
for (const releaseFilename in releaseFiles) {
const releaseFile = releaseFiles[releaseFilename];
const release = await githubRelease(projectName, tagName);
const uploadUrlTemplate = uriTemplate.parse(release.upload_url);
const uploadUrl = uploadUrlTemplate.expand({ name: releaseFile.apkFilename });
const binaryBody = await fs.readFile(apkFilePath);
const oauthToken = await githubOauthToken();
const binaryBody = await fs.readFile(releaseFile.apkFilePath);
console.info('Uploading ' + releaseFile.apkFilename + ' to ' + uploadUrl);