mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Tools: Allow creating multiple Android releases
This commit is contained in:
parent
2f80bf9647
commit
1d3d3b99bb
@ -134,6 +134,7 @@ async function createRelease(name, tagName, version) {
|
||||
|
||||
return {
|
||||
downloadUrl: downloadUrl,
|
||||
apkFilename: apkFilename,
|
||||
};
|
||||
}
|
||||
|
||||
@ -165,16 +166,17 @@ async function main() {
|
||||
|
||||
console.info('Creating GitHub release ' + tagName + '...');
|
||||
|
||||
for (const releaseFile of releaseFiles) {
|
||||
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: apkFilename });
|
||||
const uploadUrl = uploadUrlTemplate.expand({ name: releaseFile.apkFilename });
|
||||
|
||||
const binaryBody = await fs.readFile(apkFilePath);
|
||||
|
||||
const oauthToken = await githubOauthToken();
|
||||
|
||||
console.info('Uploading ' + apkFilename + ' to ' + uploadUrl);
|
||||
console.info('Uploading ' + releaseFile.apkFilename + ' to ' + uploadUrl);
|
||||
|
||||
const uploadResponse = await fetch(uploadUrl, {
|
||||
method: 'POST',
|
||||
|
Loading…
Reference in New Issue
Block a user