Skip to content

Commit 6bfb9f2

Browse files
authored
Display deprecated warning on v2 branch (#1138)
* chore: show deprecation warning Signed-off-by: Olivier Vernin <me@olblak.com> * deps: update updatecli to v0.119.0 Signed-off-by: Olivier Vernin <me@olblak.com> * docs: use full version Signed-off-by: Olivier Vernin <me@olblak.com> * fix: linting issue Signed-off-by: Olivier Vernin <me@olblak.com> * Rebuild dist Signed-off-by: Olivier Vernin <me@olblak.com> * fix: test Signed-off-by: Olivier Vernin <me@olblak.com> * fix: linter Signed-off-by: Olivier Vernin <me@olblak.com> --------- Signed-off-by: Olivier Vernin <me@olblak.com>
1 parent 7fea18d commit 6bfb9f2

4 files changed

Lines changed: 18 additions & 4 deletions

File tree

‎dist/index.js‎

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/index.js.map‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/main.js‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import exec from '@actions/exec'
44
import path from 'node:path'
55
import fs from 'node:fs'
66

7-
const DEFAULT_VERSION = `v0.114.0`
7+
const DEFAULT_VERSION = `v0.119.0`
88

99
// get the Updatecli version from the action inputs
1010
export async function getUpdatecliVersion() {
@@ -117,6 +117,13 @@ export async function updatecliVersion() {
117117

118118
export async function run() {
119119
try {
120+
core.warning(
121+
'You are using a deprecated branch-based reference (v2) of this action. ' +
122+
'Please update your workflow to use a tagged release instead, e.g. ' +
123+
'`uses: updatecli/updatecli-action@v3.0.0`. ' +
124+
'Branch references are not recommended as they may receive breaking changes without notice. ' +
125+
'See https://github.com/updatecli/updatecli-action/releases for the latest release.'
126+
)
120127
const version = await getUpdatecliVersion()
121128
await updatecliDownload(version)
122129
await updatecliVersion()

‎tests/main.test.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const temporaryPath = path.join(directory, 'TEMP')
1919
process.env['RUNNER_TEMP'] = temporaryPath
2020
process.env['RUNNER_TOOL_CACHE'] = cachePath
2121

22-
const DEFAULT_VERSION = `v0.114.0`
22+
const DEFAULT_VERSION = `v0.119.0`
2323
const versionWithoutV = DEFAULT_VERSION.slice(1)
2424

2525
const originalPlatform = process.platform

0 commit comments

Comments
 (0)