Fix github release tag

This commit is contained in:
CrazyMax 2020-05-07 12:13:15 +02:00
parent 6837697d11
commit 88a78e2f11

View File

@ -6,7 +6,7 @@ export interface GitHubRelease {
} }
export const getRelease = async (version: string): Promise<GitHubRelease | null> => { export const getRelease = async (version: string): Promise<GitHubRelease | null> => {
const url: string = `https://github.com/upx/upx/releases/${version !== 'latest' ? `v${version}` : version}`; const url: string = `https://github.com/upx/upx/releases/${version}`;
const http: httpm.HttpClient = new httpm.HttpClient('ghaction-upx'); const http: httpm.HttpClient = new httpm.HttpClient('ghaction-upx');
return (await http.getJson<GitHubRelease>(url)).result; return (await http.getJson<GitHubRelease>(url)).result;
}; };