Compare commits
3 Commits
Vendored
+4
-1
@@ -82835,11 +82835,14 @@ const path = __nccwpck_require__(1017);
|
|||||||
const semver = __nccwpck_require__(117);
|
const semver = __nccwpck_require__(117);
|
||||||
const git = __nccwpck_require__(3555);
|
const git = __nccwpck_require__(3555);
|
||||||
function getInstallerUrl(version, latest) {
|
function getInstallerUrl(version, latest) {
|
||||||
const ver = version.version;
|
let ver = version.version;
|
||||||
switch (version.type) {
|
switch (version.type) {
|
||||||
case 'heads': {
|
case 'heads': {
|
||||||
const arch = os.arch() === 'x64' ? 'win64' : 'win32';
|
const arch = os.arch() === 'x64' ? 'win64' : 'win32';
|
||||||
const latestver = latest.version;
|
const latestver = latest.version;
|
||||||
|
if (ver !== 'dev' && ver !== 'master') {
|
||||||
|
ver = latestver;
|
||||||
|
}
|
||||||
return `https://github.com/xmake-io/xmake/releases/download/${latestver}/xmake-${ver}.${arch}.exe`;
|
return `https://github.com/xmake-io/xmake/releases/download/${latestver}/xmake-${ver}.${arch}.exe`;
|
||||||
}
|
}
|
||||||
case 'pull': {
|
case 'pull': {
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "github-action-setup-xmake",
|
"name": "github-action-setup-xmake",
|
||||||
"version": "1.1.2",
|
"version": "1.1.3",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "github-action-setup-xmake",
|
"name": "github-action-setup-xmake",
|
||||||
"version": "1.1.2",
|
"version": "1.1.3",
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": "^3.2.4",
|
"@actions/cache": "^3.2.4",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "github-action-setup-xmake",
|
"name": "github-action-setup-xmake",
|
||||||
"version": "1.1.2",
|
"version": "1.1.3",
|
||||||
"description": "Set up your GitHub Actions workflow with a specific version of xmake",
|
"description": "Set up your GitHub Actions workflow with a specific version of xmake",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"author": "OpportunityLiu",
|
"author": "OpportunityLiu",
|
||||||
|
|||||||
+4
-1
@@ -11,11 +11,14 @@ import * as git from './git';
|
|||||||
import { Version, GitVersion } from './interfaces';
|
import { Version, GitVersion } from './interfaces';
|
||||||
|
|
||||||
function getInstallerUrl(version: GitVersion, latest: GitVersion): string {
|
function getInstallerUrl(version: GitVersion, latest: GitVersion): string {
|
||||||
const ver = version.version;
|
let ver = version.version;
|
||||||
switch (version.type) {
|
switch (version.type) {
|
||||||
case 'heads': {
|
case 'heads': {
|
||||||
const arch = os.arch() === 'x64' ? 'win64' : 'win32';
|
const arch = os.arch() === 'x64' ? 'win64' : 'win32';
|
||||||
const latestver = latest.version;
|
const latestver = latest.version;
|
||||||
|
if (ver !== 'dev' && ver !== 'master') {
|
||||||
|
ver = latestver;
|
||||||
|
}
|
||||||
return `https://github.com/xmake-io/xmake/releases/download/${latestver}/xmake-${ver}.${arch}.exe`;
|
return `https://github.com/xmake-io/xmake/releases/download/${latestver}/xmake-${ver}.${arch}.exe`;
|
||||||
}
|
}
|
||||||
case 'pull': {
|
case 'pull': {
|
||||||
|
|||||||
Reference in New Issue
Block a user