Skip to content

Commit 373cc2b

Browse files
committed
allow custom cli version
1 parent ac29107 commit 373cc2b

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.DS_Store
2+
.idea/
23
node_modules/
34
.pnp.*
45
.yarn/*

dist/index.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29879,9 +29879,7 @@ const tc = __nccwpck_require__(3472)
2987929879
const osPlat = os.platform()
2988029880
const osArch = os.arch()
2988129881

29882-
const version = '1.0.5'
29883-
29884-
async function install () {
29882+
async function install (version) {
2988529883
const downloadUrl = `https://github.com/deploys-app/deploys/releases/download/v${version}/${getFilename(version)}`
2988629884
core.info(`Downloading ${downloadUrl}...`)
2988729885
const downloadedPath = await tc.downloadTool(downloadUrl)
@@ -31854,6 +31852,8 @@ const core = __nccwpck_require__(7484)
3185431852
const exec = __nccwpck_require__(5236)
3185531853
const installer = __nccwpck_require__(4109)
3185631854

31855+
const version = '1.0.6'
31856+
3185731857
async function run () {
3185831858
try {
3185931859
const inputs = {
@@ -31866,8 +31866,11 @@ async function run () {
3186631866
minReplicas: core.getInput('minReplicas'),
3186731867
maxReplicas: core.getInput('maxReplicas')
3186831868
}
31869+
const env = {
31870+
version: process.env.DEPLOYS_CLI_VERSION || version,
31871+
}
3186931872

31870-
const deploys = await installer.install()
31873+
const deploys = await installer.install(env.version)
3187131874
core.info('Deploys CLI installed sucessfully')
3187231875

3187331876
core.info('Deploying...')

src/installer.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ const tc = require('@actions/tool-cache')
66
const osPlat = os.platform()
77
const osArch = os.arch()
88

9-
const version = '1.0.5'
10-
11-
export async function install () {
9+
export async function install (version) {
1210
const downloadUrl = `https://github.com/deploys-app/deploys/releases/download/v${version}/${getFilename(version)}`
1311
core.info(`Downloading ${downloadUrl}...`)
1412
const downloadedPath = await tc.downloadTool(downloadUrl)

src/main.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ const core = require('@actions/core')
22
const exec = require('@actions/exec')
33
const installer = require('./installer')
44

5+
const version = '1.0.6'
6+
57
async function run () {
68
try {
79
const inputs = {
@@ -14,8 +16,11 @@ async function run () {
1416
minReplicas: core.getInput('minReplicas'),
1517
maxReplicas: core.getInput('maxReplicas')
1618
}
19+
const env = {
20+
version: process.env.DEPLOYS_CLI_VERSION || version,
21+
}
1722

18-
const deploys = await installer.install()
23+
const deploys = await installer.install(env.version)
1924
core.info('Deploys CLI installed sucessfully')
2025

2126
core.info('Deploying...')

0 commit comments

Comments
 (0)