mirror of
https://github.com/actions/toolkit.git
synced 2026-08-24 00:00:19 +02:00
Pull the package version from package.json
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
// Version is hardcoded to avoid issues with import.meta.url in Jest
|
// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports
|
||||||
const VERSION = '6.0.0'
|
const packageJson = require('../../../package.json')
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ensure that this User Agent String is used in all HTTP calls so that we can monitor telemetry between different versions of this package
|
* Ensure that this User Agent String is used in all HTTP calls so that we can monitor telemetry between different versions of this package
|
||||||
*/
|
*/
|
||||||
export function getUserAgentString(): string {
|
export function getUserAgentString(): string {
|
||||||
return `@actions/artifact-${VERSION}`
|
return `@actions/artifact-${packageJson.version}`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user