1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-21 09:38:01 +02:00

Doc: Remove 32-bit Android release, and fixed readme auto-update

This commit is contained in:
Laurent Cozic 2023-07-11 18:37:43 +01:00
parent 0690f7354f
commit dbb7df138e
3 changed files with 20 additions and 4 deletions

View File

@ -38,7 +38,7 @@ The install and update script supports the [following flags](https://github.com/
Operating System | Download | Alt. Download Operating System | Download | Alt. Download
---|---|--- ---|---|---
Android | <a href='https://play.google.com/store/apps/details?id=net.cozic.joplin&utm_source=GitHub&utm_campaign=README&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img alt='Get it on Google Play' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/BadgeAndroid.png'/></a> | or download the APK file: [64-bit](https://objects.joplinusercontent.com/v2.9.8/joplin-v2.9.8.apk?source=JoplinWebsite&type=New) [32-bit](https://objects.joplinusercontent.com/v2.9.8/joplin-v2.9.8-32bit.apk?source=JoplinWebsite&type=New) Android | <a href='https://play.google.com/store/apps/details?id=net.cozic.joplin&utm_source=GitHub&utm_campaign=README&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img alt='Get it on Google Play' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/BadgeAndroid.png'/></a> | or download the [APK file](https://objects.joplinusercontent.com/v2.11.31/joplin-v2.11.31.apk?source=JoplinWebsite&type=New)
iOS | <a href='https://itunes.apple.com/us/app/joplin/id1315599797'><img alt='Get it on the App Store' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/BadgeIOS.png'/></a> | - iOS | <a href='https://itunes.apple.com/us/app/joplin/id1315599797'><img alt='Get it on the App Store' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/BadgeIOS.png'/></a> | -
## Terminal application ## Terminal application

View File

@ -334,7 +334,23 @@ export function githubOauthToken() {
// says that nothing has changed on the API, although it used to work. So since // says that nothing has changed on the API, although it used to work. So since
// we can't use /latest anymore, we need to fetch all the releases to find the // we can't use /latest anymore, we need to fetch all the releases to find the
// latest published one. // latest published one.
//
// As of July 2023 /latest seems to be working again, so switching back to this
// method, but let's keep the old method just in case they break the API again.
export async function gitHubLatestRelease(repoName: string): Promise<GitHubRelease> { export async function gitHubLatestRelease(repoName: string): Promise<GitHubRelease> {
const response: any = await fetch(`https://api.github.com/repos/laurent22/${repoName}/releases/latest`, {
headers: {
'Content-Type': 'application/json',
'User-Agent': 'Joplin Readme Updater',
},
});
if (!response.ok) throw new Error(`Cannot fetch releases: ${response.statusText}`);
return response.json();
}
export async function gitHubLatestRelease_KeepInCaseMicrosoftBreaksTheApiAgain(repoName: string): Promise<GitHubRelease> {
let pageNum = 1; let pageNum = 1;
while (true) { while (true) {

View File

@ -81,7 +81,7 @@ async function main(argv: any) {
const androidRelease = await gitHubLatestRelease('joplin-android'); const androidRelease = await gitHubLatestRelease('joplin-android');
const android32Url = downloadUrl(androidRelease, OS.Android32); // const android32Url = downloadUrl(androidRelease, OS.Android32);
const androidUrl = downloadUrl(androidRelease, OS.Android); const androidUrl = downloadUrl(androidRelease, OS.Android);
const winUrl = downloadUrl(release, OS.Windows); const winUrl = downloadUrl(release, OS.Windows);
const winPortableUrl = downloadUrl(release, OS.Windows, true); const winPortableUrl = downloadUrl(release, OS.Windows, true);
@ -93,7 +93,7 @@ async function main(argv: any) {
console.info('macOS: ', macOsUrl); console.info('macOS: ', macOsUrl);
console.info('Linux: ', linuxUrl); console.info('Linux: ', linuxUrl);
console.info('Android: ', androidUrl); console.info('Android: ', androidUrl);
console.info('Android 32: ', android32Url); // console.info('Android 32: ', android32Url);
let content = readmeContent(); let content = readmeContent();
@ -103,7 +103,7 @@ async function main(argv: any) {
if (linuxUrl) content = content.replace(/(https:\/\/objects.joplinusercontent.com\/v\d+\.\d+\.\d+\/Joplin-.*?\.AppImage)/, linuxUrl); if (linuxUrl) content = content.replace(/(https:\/\/objects.joplinusercontent.com\/v\d+\.\d+\.\d+\/Joplin-.*?\.AppImage)/, linuxUrl);
if (androidUrl) content = content.replace(/(https:\/\/objects.joplinusercontent.com\/v\d+\.\d+\.\d+\/joplin-v\d+\.\d+\.\d+\.apk)/, androidUrl); if (androidUrl) content = content.replace(/(https:\/\/objects.joplinusercontent.com\/v\d+\.\d+\.\d+\/joplin-v\d+\.\d+\.\d+\.apk)/, androidUrl);
if (android32Url) content = content.replace(/(https:\/\/objects.joplinusercontent.com\/v\d+\.\d+\.\d+\/joplin-v\d+\.\d+\.\d+-32bit\.apk)/, android32Url); // if (android32Url) content = content.replace(/(https:\/\/objects.joplinusercontent.com\/v\d+\.\d+\.\d+\/joplin-v\d+\.\d+\.\d+-32bit\.apk)/, android32Url);
setReadmeContent(content); setReadmeContent(content);
} }