mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-10-23 18:38:56 +08:00
Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
915a66c096 | ||
|
8e5c8782a3 | ||
|
9f977db2d8 | ||
|
fa27d06744 | ||
|
a0fdbb009a | ||
|
f59a6d4310 | ||
|
b69de5f2a9 | ||
|
3c11eee5f9 | ||
|
4301451b53 | ||
|
295170c2ce | ||
|
ce999babab | ||
|
ce35ffa374 | ||
|
ad97b0f09e | ||
|
29c79cfd95 |
@@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=38f66cd6eef217b4c35855bb11ea4e9fbc53594ccccb5fb82dfd317ef8c2c5a3
|
distributionSha256Sum=03ec176d388f2aa99defcadc3ac6adf8dd2bce5145a129659537c0874dea5ad1
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=38f66cd6eef217b4c35855bb11ea4e9fbc53594ccccb5fb82dfd317ef8c2c5a3
|
distributionSha256Sum=03ec176d388f2aa99defcadc3ac6adf8dd2bce5145a129659537c0874dea5ad1
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=38f66cd6eef217b4c35855bb11ea4e9fbc53594ccccb5fb82dfd317ef8c2c5a3
|
distributionSha256Sum=03ec176d388f2aa99defcadc3ac6adf8dd2bce5145a129659537c0874dea5ad1
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=38f66cd6eef217b4c35855bb11ea4e9fbc53594ccccb5fb82dfd317ef8c2c5a3
|
distributionSha256Sum=03ec176d388f2aa99defcadc3ac6adf8dd2bce5145a129659537c0874dea5ad1
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
2
.github/workflows/ci-init-script-check.yml
vendored
2
.github/workflows/ci-init-script-check.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
|||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 8
|
java-version: 8
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/gradle-build-action@v2.5.1 # Use a released version to avoid breakages
|
uses: gradle/gradle-build-action@v2.6.0 # Use a released version to avoid breakages
|
||||||
- name: Run integration tests
|
- name: Run integration tests
|
||||||
working-directory: test/init-scripts
|
working-directory: test/init-scripts
|
||||||
run: ./gradlew check
|
run: ./gradlew check
|
||||||
|
2
.github/workflows/ci-quick-check.yml
vendored
2
.github/workflows/ci-quick-check.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
|||||||
- name: Configure Gradle as default for unit test
|
- name: Configure Gradle as default for unit test
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
gradle-version: 8.2
|
gradle-version: 8.2.1
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
npm install
|
npm install
|
||||||
|
@@ -66,3 +66,33 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
dependency-graph: download-and-submit
|
dependency-graph: download-and-submit
|
||||||
|
|
||||||
|
multiple-builds:
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Download distribution if required
|
||||||
|
uses: ./.github/actions/download-dist
|
||||||
|
- name: Setup Gradle for dependency-graph generate
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
dependency-graph: generate
|
||||||
|
- name: Run assemble
|
||||||
|
run: ./gradlew assemble
|
||||||
|
working-directory: .github/workflow-samples/groovy-dsl
|
||||||
|
env:
|
||||||
|
GITHUB_JOB_CORRELATOR: job-correlator
|
||||||
|
- name: Run build
|
||||||
|
run: ./gradlew build
|
||||||
|
working-directory: .github/workflow-samples/groovy-dsl
|
||||||
|
env:
|
||||||
|
GITHUB_JOB_CORRELATOR: job-correlator
|
||||||
|
- name: Check generated dependency graphs
|
||||||
|
run: |
|
||||||
|
ls -l dependency-graph-reports
|
||||||
|
if ([ ! -e dependency-graph-reports/job-correlator.json ] || [ ! -e dependency-graph-reports/job-correlator-1.json ])
|
||||||
|
then
|
||||||
|
echo "Did not find expected dependency graph files"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
# Configuration file for asdf version manager
|
# Configuration file for asdf version manager
|
||||||
nodejs 16.18.1
|
nodejs 16.18.1
|
||||||
gradle 8.2
|
gradle 8.2.1
|
||||||
|
26
README.md
26
README.md
@@ -456,32 +456,6 @@ jobs:
|
|||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
```
|
```
|
||||||
|
|
||||||
### Running multiple builds in a single Job
|
|
||||||
|
|
||||||
GitHub tracks dependency snapshots based on the `job.correlator` value that is embedded in the snapshot. When a newer snapshot for an existing correlator is submitted, the previous snapshot is replaced. Snapshots with different `job.correlator` values are additive to the overall dependency graph for the repository.
|
|
||||||
|
|
||||||
The `gradle-build-action` will generate a `job.correlator` value based on the workflow name, job id and matrix values. However, if your job steps contains multiple Gradle invocations, then a unique correlator value must be assigned to each. You assign a correlator by setting the `GITHUB_DEPENDENCY_GRAPH_JOB_CORRELATOR` environment variable.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
name: dependency-graph
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Setup Gradle to generate and submit dependency graphs
|
|
||||||
uses: gradle/gradle-build-action@dependency-graph
|
|
||||||
with:
|
|
||||||
dependency-graph: generate-and-submit
|
|
||||||
- name: Run first build using the default job correlator 'dependency-graph-build'
|
|
||||||
run: ./gradlew build
|
|
||||||
- name: Run second build providing a unique job correlator
|
|
||||||
run: ./gradlew test
|
|
||||||
env:
|
|
||||||
GITHUB_DEPENDENCY_GRAPH_JOB_CORRELATOR: dependency-graph-test
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
### Dependency snapshots generated for pull requests
|
### Dependency snapshots generated for pull requests
|
||||||
|
|
||||||
This `contents: write` permission is not available for any workflow that is triggered by a pull request submitted from a forked repository, since it would permit a malicious pull request to make repository changes.
|
This `contents: write` permission is not available for any workflow that is triggered by a pull request submitted from a forked repository, since it would permit a malicious pull request to make repository changes.
|
||||||
|
72938
dist/dependency-graph-generate/index.js
vendored
72938
dist/dependency-graph-generate/index.js
vendored
File diff suppressed because one or more lines are too long
1
dist/dependency-graph-generate/index.js.map
vendored
1
dist/dependency-graph-generate/index.js.map
vendored
File diff suppressed because one or more lines are too long
24783
dist/dependency-graph-submit/index.js
vendored
24783
dist/dependency-graph-submit/index.js
vendored
File diff suppressed because one or more lines are too long
1
dist/dependency-graph-submit/index.js.map
vendored
1
dist/dependency-graph-submit/index.js.map
vendored
File diff suppressed because one or more lines are too long
144
dist/main/index.js
vendored
144
dist/main/index.js
vendored
@@ -61088,8 +61088,11 @@ var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
|
|||||||
// Max safe segment length for coercion.
|
// Max safe segment length for coercion.
|
||||||
var MAX_SAFE_COMPONENT_LENGTH = 16
|
var MAX_SAFE_COMPONENT_LENGTH = 16
|
||||||
|
|
||||||
|
var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6
|
||||||
|
|
||||||
// The actual regexps go on exports.re
|
// The actual regexps go on exports.re
|
||||||
var re = exports.re = []
|
var re = exports.re = []
|
||||||
|
var safeRe = exports.safeRe = []
|
||||||
var src = exports.src = []
|
var src = exports.src = []
|
||||||
var t = exports.tokens = {}
|
var t = exports.tokens = {}
|
||||||
var R = 0
|
var R = 0
|
||||||
@@ -61098,6 +61101,31 @@ function tok (n) {
|
|||||||
t[n] = R++
|
t[n] = R++
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var LETTERDASHNUMBER = '[a-zA-Z0-9-]'
|
||||||
|
|
||||||
|
// Replace some greedy regex tokens to prevent regex dos issues. These regex are
|
||||||
|
// used internally via the safeRe object since all inputs in this library get
|
||||||
|
// normalized first to trim and collapse all extra whitespace. The original
|
||||||
|
// regexes are exported for userland consumption and lower level usage. A
|
||||||
|
// future breaking change could export the safer regex only with a note that
|
||||||
|
// all input should have extra whitespace removed.
|
||||||
|
var safeRegexReplacements = [
|
||||||
|
['\\s', 1],
|
||||||
|
['\\d', MAX_LENGTH],
|
||||||
|
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],
|
||||||
|
]
|
||||||
|
|
||||||
|
function makeSafeRe (value) {
|
||||||
|
for (var i = 0; i < safeRegexReplacements.length; i++) {
|
||||||
|
var token = safeRegexReplacements[i][0]
|
||||||
|
var max = safeRegexReplacements[i][1]
|
||||||
|
value = value
|
||||||
|
.split(token + '*').join(token + '{0,' + max + '}')
|
||||||
|
.split(token + '+').join(token + '{1,' + max + '}')
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
|
||||||
// The following Regular Expressions can be used for tokenizing,
|
// The following Regular Expressions can be used for tokenizing,
|
||||||
// validating, and parsing SemVer version strings.
|
// validating, and parsing SemVer version strings.
|
||||||
|
|
||||||
@@ -61107,14 +61135,14 @@ function tok (n) {
|
|||||||
tok('NUMERICIDENTIFIER')
|
tok('NUMERICIDENTIFIER')
|
||||||
src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*'
|
src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*'
|
||||||
tok('NUMERICIDENTIFIERLOOSE')
|
tok('NUMERICIDENTIFIERLOOSE')
|
||||||
src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+'
|
src[t.NUMERICIDENTIFIERLOOSE] = '\\d+'
|
||||||
|
|
||||||
// ## Non-numeric Identifier
|
// ## Non-numeric Identifier
|
||||||
// Zero or more digits, followed by a letter or hyphen, and then zero or
|
// Zero or more digits, followed by a letter or hyphen, and then zero or
|
||||||
// more letters, digits, or hyphens.
|
// more letters, digits, or hyphens.
|
||||||
|
|
||||||
tok('NONNUMERICIDENTIFIER')
|
tok('NONNUMERICIDENTIFIER')
|
||||||
src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'
|
src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-]' + LETTERDASHNUMBER + '*'
|
||||||
|
|
||||||
// ## Main Version
|
// ## Main Version
|
||||||
// Three dot-separated numeric identifiers.
|
// Three dot-separated numeric identifiers.
|
||||||
@@ -61156,7 +61184,7 @@ src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] +
|
|||||||
// Any combination of digits, letters, or hyphens.
|
// Any combination of digits, letters, or hyphens.
|
||||||
|
|
||||||
tok('BUILDIDENTIFIER')
|
tok('BUILDIDENTIFIER')
|
||||||
src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+'
|
src[t.BUILDIDENTIFIER] = LETTERDASHNUMBER + '+'
|
||||||
|
|
||||||
// ## Build Metadata
|
// ## Build Metadata
|
||||||
// Plus sign, followed by one or more period-separated build metadata
|
// Plus sign, followed by one or more period-separated build metadata
|
||||||
@@ -61236,6 +61264,7 @@ src[t.COERCE] = '(^|[^\\d])' +
|
|||||||
'(?:$|[^\\d])'
|
'(?:$|[^\\d])'
|
||||||
tok('COERCERTL')
|
tok('COERCERTL')
|
||||||
re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g')
|
re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g')
|
||||||
|
safeRe[t.COERCERTL] = new RegExp(makeSafeRe(src[t.COERCE]), 'g')
|
||||||
|
|
||||||
// Tilde ranges.
|
// Tilde ranges.
|
||||||
// Meaning is "reasonably at or greater than"
|
// Meaning is "reasonably at or greater than"
|
||||||
@@ -61245,6 +61274,7 @@ src[t.LONETILDE] = '(?:~>?)'
|
|||||||
tok('TILDETRIM')
|
tok('TILDETRIM')
|
||||||
src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+'
|
src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+'
|
||||||
re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g')
|
re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g')
|
||||||
|
safeRe[t.TILDETRIM] = new RegExp(makeSafeRe(src[t.TILDETRIM]), 'g')
|
||||||
var tildeTrimReplace = '$1~'
|
var tildeTrimReplace = '$1~'
|
||||||
|
|
||||||
tok('TILDE')
|
tok('TILDE')
|
||||||
@@ -61260,6 +61290,7 @@ src[t.LONECARET] = '(?:\\^)'
|
|||||||
tok('CARETTRIM')
|
tok('CARETTRIM')
|
||||||
src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+'
|
src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+'
|
||||||
re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g')
|
re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g')
|
||||||
|
safeRe[t.CARETTRIM] = new RegExp(makeSafeRe(src[t.CARETTRIM]), 'g')
|
||||||
var caretTrimReplace = '$1^'
|
var caretTrimReplace = '$1^'
|
||||||
|
|
||||||
tok('CARET')
|
tok('CARET')
|
||||||
@@ -61281,6 +61312,7 @@ src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] +
|
|||||||
|
|
||||||
// this one has to use the /g flag
|
// this one has to use the /g flag
|
||||||
re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g')
|
re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g')
|
||||||
|
safeRe[t.COMPARATORTRIM] = new RegExp(makeSafeRe(src[t.COMPARATORTRIM]), 'g')
|
||||||
var comparatorTrimReplace = '$1$2$3'
|
var comparatorTrimReplace = '$1$2$3'
|
||||||
|
|
||||||
// Something like `1.2.3 - 1.2.4`
|
// Something like `1.2.3 - 1.2.4`
|
||||||
@@ -61309,6 +61341,14 @@ for (var i = 0; i < R; i++) {
|
|||||||
debug(i, src[i])
|
debug(i, src[i])
|
||||||
if (!re[i]) {
|
if (!re[i]) {
|
||||||
re[i] = new RegExp(src[i])
|
re[i] = new RegExp(src[i])
|
||||||
|
|
||||||
|
// Replace all greedy whitespace to prevent regex dos issues. These regex are
|
||||||
|
// used internally via the safeRe object since all inputs in this library get
|
||||||
|
// normalized first to trim and collapse all extra whitespace. The original
|
||||||
|
// regexes are exported for userland consumption and lower level usage. A
|
||||||
|
// future breaking change could export the safer regex only with a note that
|
||||||
|
// all input should have extra whitespace removed.
|
||||||
|
safeRe[i] = new RegExp(makeSafeRe(src[i]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61333,7 +61373,7 @@ function parse (version, options) {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
var r = options.loose ? re[t.LOOSE] : re[t.FULL]
|
var r = options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]
|
||||||
if (!r.test(version)) {
|
if (!r.test(version)) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
@@ -61388,7 +61428,7 @@ function SemVer (version, options) {
|
|||||||
this.options = options
|
this.options = options
|
||||||
this.loose = !!options.loose
|
this.loose = !!options.loose
|
||||||
|
|
||||||
var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])
|
var m = version.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL])
|
||||||
|
|
||||||
if (!m) {
|
if (!m) {
|
||||||
throw new TypeError('Invalid Version: ' + version)
|
throw new TypeError('Invalid Version: ' + version)
|
||||||
@@ -61833,6 +61873,7 @@ function Comparator (comp, options) {
|
|||||||
return new Comparator(comp, options)
|
return new Comparator(comp, options)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
comp = comp.trim().split(/\s+/).join(' ')
|
||||||
debug('comparator', comp, options)
|
debug('comparator', comp, options)
|
||||||
this.options = options
|
this.options = options
|
||||||
this.loose = !!options.loose
|
this.loose = !!options.loose
|
||||||
@@ -61849,7 +61890,7 @@ function Comparator (comp, options) {
|
|||||||
|
|
||||||
var ANY = {}
|
var ANY = {}
|
||||||
Comparator.prototype.parse = function (comp) {
|
Comparator.prototype.parse = function (comp) {
|
||||||
var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
|
var r = this.options.loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]
|
||||||
var m = comp.match(r)
|
var m = comp.match(r)
|
||||||
|
|
||||||
if (!m) {
|
if (!m) {
|
||||||
@@ -61973,9 +62014,16 @@ function Range (range, options) {
|
|||||||
this.loose = !!options.loose
|
this.loose = !!options.loose
|
||||||
this.includePrerelease = !!options.includePrerelease
|
this.includePrerelease = !!options.includePrerelease
|
||||||
|
|
||||||
// First, split based on boolean or ||
|
// First reduce all whitespace as much as possible so we do not have to rely
|
||||||
|
// on potentially slow regexes like \s*. This is then stored and used for
|
||||||
|
// future error messages as well.
|
||||||
this.raw = range
|
this.raw = range
|
||||||
this.set = range.split(/\s*\|\|\s*/).map(function (range) {
|
.trim()
|
||||||
|
.split(/\s+/)
|
||||||
|
.join(' ')
|
||||||
|
|
||||||
|
// First, split based on boolean or ||
|
||||||
|
this.set = this.raw.split('||').map(function (range) {
|
||||||
return this.parseRange(range.trim())
|
return this.parseRange(range.trim())
|
||||||
}, this).filter(function (c) {
|
}, this).filter(function (c) {
|
||||||
// throw out any that are not relevant for whatever reason
|
// throw out any that are not relevant for whatever reason
|
||||||
@@ -61983,7 +62031,7 @@ function Range (range, options) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (!this.set.length) {
|
if (!this.set.length) {
|
||||||
throw new TypeError('Invalid SemVer Range: ' + range)
|
throw new TypeError('Invalid SemVer Range: ' + this.raw)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.format()
|
this.format()
|
||||||
@@ -62002,20 +62050,19 @@ Range.prototype.toString = function () {
|
|||||||
|
|
||||||
Range.prototype.parseRange = function (range) {
|
Range.prototype.parseRange = function (range) {
|
||||||
var loose = this.options.loose
|
var loose = this.options.loose
|
||||||
range = range.trim()
|
|
||||||
// `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
|
// `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
|
||||||
var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]
|
var hr = loose ? safeRe[t.HYPHENRANGELOOSE] : safeRe[t.HYPHENRANGE]
|
||||||
range = range.replace(hr, hyphenReplace)
|
range = range.replace(hr, hyphenReplace)
|
||||||
debug('hyphen replace', range)
|
debug('hyphen replace', range)
|
||||||
// `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
|
// `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
|
||||||
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)
|
range = range.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace)
|
||||||
debug('comparator trim', range, re[t.COMPARATORTRIM])
|
debug('comparator trim', range, safeRe[t.COMPARATORTRIM])
|
||||||
|
|
||||||
// `~ 1.2.3` => `~1.2.3`
|
// `~ 1.2.3` => `~1.2.3`
|
||||||
range = range.replace(re[t.TILDETRIM], tildeTrimReplace)
|
range = range.replace(safeRe[t.TILDETRIM], tildeTrimReplace)
|
||||||
|
|
||||||
// `^ 1.2.3` => `^1.2.3`
|
// `^ 1.2.3` => `^1.2.3`
|
||||||
range = range.replace(re[t.CARETTRIM], caretTrimReplace)
|
range = range.replace(safeRe[t.CARETTRIM], caretTrimReplace)
|
||||||
|
|
||||||
// normalize spaces
|
// normalize spaces
|
||||||
range = range.split(/\s+/).join(' ')
|
range = range.split(/\s+/).join(' ')
|
||||||
@@ -62023,7 +62070,7 @@ Range.prototype.parseRange = function (range) {
|
|||||||
// At this point, the range is completely trimmed and
|
// At this point, the range is completely trimmed and
|
||||||
// ready to be split into comparators.
|
// ready to be split into comparators.
|
||||||
|
|
||||||
var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
|
var compRe = loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]
|
||||||
var set = range.split(' ').map(function (comp) {
|
var set = range.split(' ').map(function (comp) {
|
||||||
return parseComparator(comp, this.options)
|
return parseComparator(comp, this.options)
|
||||||
}, this).join(' ').split(/\s+/)
|
}, this).join(' ').split(/\s+/)
|
||||||
@@ -62123,7 +62170,7 @@ function replaceTildes (comp, options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function replaceTilde (comp, options) {
|
function replaceTilde (comp, options) {
|
||||||
var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]
|
var r = options.loose ? safeRe[t.TILDELOOSE] : safeRe[t.TILDE]
|
||||||
return comp.replace(r, function (_, M, m, p, pr) {
|
return comp.replace(r, function (_, M, m, p, pr) {
|
||||||
debug('tilde', comp, _, M, m, p, pr)
|
debug('tilde', comp, _, M, m, p, pr)
|
||||||
var ret
|
var ret
|
||||||
@@ -62164,7 +62211,7 @@ function replaceCarets (comp, options) {
|
|||||||
|
|
||||||
function replaceCaret (comp, options) {
|
function replaceCaret (comp, options) {
|
||||||
debug('caret', comp, options)
|
debug('caret', comp, options)
|
||||||
var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]
|
var r = options.loose ? safeRe[t.CARETLOOSE] : safeRe[t.CARET]
|
||||||
return comp.replace(r, function (_, M, m, p, pr) {
|
return comp.replace(r, function (_, M, m, p, pr) {
|
||||||
debug('caret', comp, _, M, m, p, pr)
|
debug('caret', comp, _, M, m, p, pr)
|
||||||
var ret
|
var ret
|
||||||
@@ -62223,7 +62270,7 @@ function replaceXRanges (comp, options) {
|
|||||||
|
|
||||||
function replaceXRange (comp, options) {
|
function replaceXRange (comp, options) {
|
||||||
comp = comp.trim()
|
comp = comp.trim()
|
||||||
var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]
|
var r = options.loose ? safeRe[t.XRANGELOOSE] : safeRe[t.XRANGE]
|
||||||
return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
|
return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
|
||||||
debug('xRange', comp, ret, gtlt, M, m, p, pr)
|
debug('xRange', comp, ret, gtlt, M, m, p, pr)
|
||||||
var xM = isX(M)
|
var xM = isX(M)
|
||||||
@@ -62298,7 +62345,7 @@ function replaceXRange (comp, options) {
|
|||||||
function replaceStars (comp, options) {
|
function replaceStars (comp, options) {
|
||||||
debug('replaceStars', comp, options)
|
debug('replaceStars', comp, options)
|
||||||
// Looseness is ignored here. star is always as loose as it gets!
|
// Looseness is ignored here. star is always as loose as it gets!
|
||||||
return comp.trim().replace(re[t.STAR], '')
|
return comp.trim().replace(safeRe[t.STAR], '')
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function is passed to string.replace(re[t.HYPHENRANGE])
|
// This function is passed to string.replace(re[t.HYPHENRANGE])
|
||||||
@@ -62624,7 +62671,7 @@ function coerce (version, options) {
|
|||||||
|
|
||||||
var match = null
|
var match = null
|
||||||
if (!options.rtl) {
|
if (!options.rtl) {
|
||||||
match = version.match(re[t.COERCE])
|
match = version.match(safeRe[t.COERCE])
|
||||||
} else {
|
} else {
|
||||||
// Find the right-most coercible string that does not share
|
// Find the right-most coercible string that does not share
|
||||||
// a terminus with a more left-ward coercible string.
|
// a terminus with a more left-ward coercible string.
|
||||||
@@ -62635,17 +62682,17 @@ function coerce (version, options) {
|
|||||||
// Stop when we get a match that ends at the string end, since no
|
// Stop when we get a match that ends at the string end, since no
|
||||||
// coercible string can be more right-ward without the same terminus.
|
// coercible string can be more right-ward without the same terminus.
|
||||||
var next
|
var next
|
||||||
while ((next = re[t.COERCERTL].exec(version)) &&
|
while ((next = safeRe[t.COERCERTL].exec(version)) &&
|
||||||
(!match || match.index + match[0].length !== version.length)
|
(!match || match.index + match[0].length !== version.length)
|
||||||
) {
|
) {
|
||||||
if (!match ||
|
if (!match ||
|
||||||
next.index + next[0].length !== match.index + match[0].length) {
|
next.index + next[0].length !== match.index + match[0].length) {
|
||||||
match = next
|
match = next
|
||||||
}
|
}
|
||||||
re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length
|
safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length
|
||||||
}
|
}
|
||||||
// leave it in a clean state
|
// leave it in a clean state
|
||||||
re[t.COERCERTL].lastIndex = -1
|
safeRe[t.COERCERTL].lastIndex = -1
|
||||||
}
|
}
|
||||||
|
|
||||||
if (match === null) {
|
if (match === null) {
|
||||||
@@ -73053,9 +73100,9 @@ function setup(option) {
|
|||||||
core.info('Enabling dependency graph generation');
|
core.info('Enabling dependency graph generation');
|
||||||
const jobCorrelator = getJobCorrelator();
|
const jobCorrelator = getJobCorrelator();
|
||||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_ENABLED', 'true');
|
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_ENABLED', 'true');
|
||||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_JOB_CORRELATOR', jobCorrelator);
|
core.exportVariable('GITHUB_JOB_CORRELATOR', jobCorrelator);
|
||||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_JOB_ID', github.context.runId);
|
core.exportVariable('GITHUB_JOB_ID', github.context.runId);
|
||||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_REPORT_DIR', path.resolve(layout.workspaceDirectory(), 'dependency-graph-reports'));
|
core.exportVariable('DEPENDENCY_GRAPH_REPORT_DIR', path.resolve(layout.workspaceDirectory(), 'dependency-graph-reports'));
|
||||||
}
|
}
|
||||||
exports.setup = setup;
|
exports.setup = setup;
|
||||||
function complete(option) {
|
function complete(option) {
|
||||||
@@ -73235,19 +73282,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.executeGradleBuild = void 0;
|
exports.executeGradleBuild = void 0;
|
||||||
const core = __importStar(__nccwpck_require__(2186));
|
const core = __importStar(__nccwpck_require__(2186));
|
||||||
const exec = __importStar(__nccwpck_require__(1514));
|
const exec = __importStar(__nccwpck_require__(1514));
|
||||||
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
|
||||||
const gradlew = __importStar(__nccwpck_require__(2335));
|
const gradlew = __importStar(__nccwpck_require__(2335));
|
||||||
function executeGradleBuild(executable, root, args) {
|
function executeGradleBuild(executable, root, args) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const toExecute = executable !== null && executable !== void 0 ? executable : gradlew.locateGradleWrapperScript(root);
|
const toExecute = executable !== null && executable !== void 0 ? executable : gradlew.gradleWrapperScript(root);
|
||||||
verifyIsExecutableScript(toExecute);
|
|
||||||
const status = yield exec.exec(toExecute, args, {
|
const status = yield exec.exec(toExecute, args, {
|
||||||
cwd: root,
|
cwd: root,
|
||||||
ignoreReturnCode: true
|
ignoreReturnCode: true
|
||||||
@@ -73258,14 +73300,6 @@ function executeGradleBuild(executable, root, args) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.executeGradleBuild = executeGradleBuild;
|
exports.executeGradleBuild = executeGradleBuild;
|
||||||
function verifyIsExecutableScript(toExecute) {
|
|
||||||
try {
|
|
||||||
fs_1.default.accessSync(toExecute, fs_1.default.constants.X_OK);
|
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
throw new Error(`Gradle script '${toExecute}' is not executable.`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -73302,27 +73336,41 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.locateGradleWrapperScript = exports.installScriptFilename = exports.wrapperScriptFilename = void 0;
|
exports.gradleWrapperScript = exports.installScriptFilename = exports.wrapperScriptFilename = void 0;
|
||||||
const path = __importStar(__nccwpck_require__(1017));
|
const path = __importStar(__nccwpck_require__(1017));
|
||||||
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
||||||
const IS_WINDOWS = process.platform === 'win32';
|
const IS_WINDOWS = process.platform === 'win32';
|
||||||
function wrapperScriptFilename() {
|
function wrapperScriptFilename() {
|
||||||
return IS_WINDOWS ? 'gradlew.bat' : 'gradlew';
|
return IS_WINDOWS ? './gradlew.bat' : './gradlew';
|
||||||
}
|
}
|
||||||
exports.wrapperScriptFilename = wrapperScriptFilename;
|
exports.wrapperScriptFilename = wrapperScriptFilename;
|
||||||
function installScriptFilename() {
|
function installScriptFilename() {
|
||||||
return IS_WINDOWS ? 'gradle.bat' : 'gradle';
|
return IS_WINDOWS ? 'gradle.bat' : 'gradle';
|
||||||
}
|
}
|
||||||
exports.installScriptFilename = installScriptFilename;
|
exports.installScriptFilename = installScriptFilename;
|
||||||
function locateGradleWrapperScript(buildRootDirectory) {
|
function gradleWrapperScript(buildRootDirectory) {
|
||||||
validateGradleWrapper(buildRootDirectory);
|
validateGradleWrapper(buildRootDirectory);
|
||||||
return path.resolve(buildRootDirectory, wrapperScriptFilename());
|
return wrapperScriptFilename();
|
||||||
}
|
}
|
||||||
exports.locateGradleWrapperScript = locateGradleWrapperScript;
|
exports.gradleWrapperScript = gradleWrapperScript;
|
||||||
function validateGradleWrapper(buildRootDirectory) {
|
function validateGradleWrapper(buildRootDirectory) {
|
||||||
|
const wrapperScript = path.resolve(buildRootDirectory, wrapperScriptFilename());
|
||||||
|
verifyExists(wrapperScript, 'Gradle Wrapper script');
|
||||||
|
verifyIsExecutableScript(wrapperScript);
|
||||||
const wrapperProperties = path.resolve(buildRootDirectory, 'gradle/wrapper/gradle-wrapper.properties');
|
const wrapperProperties = path.resolve(buildRootDirectory, 'gradle/wrapper/gradle-wrapper.properties');
|
||||||
if (!fs_1.default.existsSync(wrapperProperties)) {
|
verifyExists(wrapperProperties, 'Gradle wrapper properties file');
|
||||||
throw new Error(`Cannot locate a Gradle wrapper properties file at '${wrapperProperties}'. Specify 'gradle-version' or 'gradle-executable' for projects without Gradle wrapper configured.`);
|
}
|
||||||
|
function verifyExists(file, description) {
|
||||||
|
if (!fs_1.default.existsSync(file)) {
|
||||||
|
throw new Error(`Cannot locate ${description} at '${file}'. Specify 'gradle-version' or 'gradle-executable' for projects without Gradle wrapper configured.`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function verifyIsExecutableScript(toExecute) {
|
||||||
|
try {
|
||||||
|
fs_1.default.accessSync(toExecute, fs_1.default.constants.X_OK);
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
throw new Error(`Gradle script '${toExecute}' is not executable.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
dist/main/index.js.map
vendored
2
dist/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
101
dist/post/index.js
vendored
101
dist/post/index.js
vendored
@@ -61088,8 +61088,11 @@ var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
|
|||||||
// Max safe segment length for coercion.
|
// Max safe segment length for coercion.
|
||||||
var MAX_SAFE_COMPONENT_LENGTH = 16
|
var MAX_SAFE_COMPONENT_LENGTH = 16
|
||||||
|
|
||||||
|
var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6
|
||||||
|
|
||||||
// The actual regexps go on exports.re
|
// The actual regexps go on exports.re
|
||||||
var re = exports.re = []
|
var re = exports.re = []
|
||||||
|
var safeRe = exports.safeRe = []
|
||||||
var src = exports.src = []
|
var src = exports.src = []
|
||||||
var t = exports.tokens = {}
|
var t = exports.tokens = {}
|
||||||
var R = 0
|
var R = 0
|
||||||
@@ -61098,6 +61101,31 @@ function tok (n) {
|
|||||||
t[n] = R++
|
t[n] = R++
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var LETTERDASHNUMBER = '[a-zA-Z0-9-]'
|
||||||
|
|
||||||
|
// Replace some greedy regex tokens to prevent regex dos issues. These regex are
|
||||||
|
// used internally via the safeRe object since all inputs in this library get
|
||||||
|
// normalized first to trim and collapse all extra whitespace. The original
|
||||||
|
// regexes are exported for userland consumption and lower level usage. A
|
||||||
|
// future breaking change could export the safer regex only with a note that
|
||||||
|
// all input should have extra whitespace removed.
|
||||||
|
var safeRegexReplacements = [
|
||||||
|
['\\s', 1],
|
||||||
|
['\\d', MAX_LENGTH],
|
||||||
|
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],
|
||||||
|
]
|
||||||
|
|
||||||
|
function makeSafeRe (value) {
|
||||||
|
for (var i = 0; i < safeRegexReplacements.length; i++) {
|
||||||
|
var token = safeRegexReplacements[i][0]
|
||||||
|
var max = safeRegexReplacements[i][1]
|
||||||
|
value = value
|
||||||
|
.split(token + '*').join(token + '{0,' + max + '}')
|
||||||
|
.split(token + '+').join(token + '{1,' + max + '}')
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
|
||||||
// The following Regular Expressions can be used for tokenizing,
|
// The following Regular Expressions can be used for tokenizing,
|
||||||
// validating, and parsing SemVer version strings.
|
// validating, and parsing SemVer version strings.
|
||||||
|
|
||||||
@@ -61107,14 +61135,14 @@ function tok (n) {
|
|||||||
tok('NUMERICIDENTIFIER')
|
tok('NUMERICIDENTIFIER')
|
||||||
src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*'
|
src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*'
|
||||||
tok('NUMERICIDENTIFIERLOOSE')
|
tok('NUMERICIDENTIFIERLOOSE')
|
||||||
src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+'
|
src[t.NUMERICIDENTIFIERLOOSE] = '\\d+'
|
||||||
|
|
||||||
// ## Non-numeric Identifier
|
// ## Non-numeric Identifier
|
||||||
// Zero or more digits, followed by a letter or hyphen, and then zero or
|
// Zero or more digits, followed by a letter or hyphen, and then zero or
|
||||||
// more letters, digits, or hyphens.
|
// more letters, digits, or hyphens.
|
||||||
|
|
||||||
tok('NONNUMERICIDENTIFIER')
|
tok('NONNUMERICIDENTIFIER')
|
||||||
src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'
|
src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-]' + LETTERDASHNUMBER + '*'
|
||||||
|
|
||||||
// ## Main Version
|
// ## Main Version
|
||||||
// Three dot-separated numeric identifiers.
|
// Three dot-separated numeric identifiers.
|
||||||
@@ -61156,7 +61184,7 @@ src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] +
|
|||||||
// Any combination of digits, letters, or hyphens.
|
// Any combination of digits, letters, or hyphens.
|
||||||
|
|
||||||
tok('BUILDIDENTIFIER')
|
tok('BUILDIDENTIFIER')
|
||||||
src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+'
|
src[t.BUILDIDENTIFIER] = LETTERDASHNUMBER + '+'
|
||||||
|
|
||||||
// ## Build Metadata
|
// ## Build Metadata
|
||||||
// Plus sign, followed by one or more period-separated build metadata
|
// Plus sign, followed by one or more period-separated build metadata
|
||||||
@@ -61236,6 +61264,7 @@ src[t.COERCE] = '(^|[^\\d])' +
|
|||||||
'(?:$|[^\\d])'
|
'(?:$|[^\\d])'
|
||||||
tok('COERCERTL')
|
tok('COERCERTL')
|
||||||
re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g')
|
re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g')
|
||||||
|
safeRe[t.COERCERTL] = new RegExp(makeSafeRe(src[t.COERCE]), 'g')
|
||||||
|
|
||||||
// Tilde ranges.
|
// Tilde ranges.
|
||||||
// Meaning is "reasonably at or greater than"
|
// Meaning is "reasonably at or greater than"
|
||||||
@@ -61245,6 +61274,7 @@ src[t.LONETILDE] = '(?:~>?)'
|
|||||||
tok('TILDETRIM')
|
tok('TILDETRIM')
|
||||||
src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+'
|
src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+'
|
||||||
re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g')
|
re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g')
|
||||||
|
safeRe[t.TILDETRIM] = new RegExp(makeSafeRe(src[t.TILDETRIM]), 'g')
|
||||||
var tildeTrimReplace = '$1~'
|
var tildeTrimReplace = '$1~'
|
||||||
|
|
||||||
tok('TILDE')
|
tok('TILDE')
|
||||||
@@ -61260,6 +61290,7 @@ src[t.LONECARET] = '(?:\\^)'
|
|||||||
tok('CARETTRIM')
|
tok('CARETTRIM')
|
||||||
src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+'
|
src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+'
|
||||||
re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g')
|
re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g')
|
||||||
|
safeRe[t.CARETTRIM] = new RegExp(makeSafeRe(src[t.CARETTRIM]), 'g')
|
||||||
var caretTrimReplace = '$1^'
|
var caretTrimReplace = '$1^'
|
||||||
|
|
||||||
tok('CARET')
|
tok('CARET')
|
||||||
@@ -61281,6 +61312,7 @@ src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] +
|
|||||||
|
|
||||||
// this one has to use the /g flag
|
// this one has to use the /g flag
|
||||||
re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g')
|
re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g')
|
||||||
|
safeRe[t.COMPARATORTRIM] = new RegExp(makeSafeRe(src[t.COMPARATORTRIM]), 'g')
|
||||||
var comparatorTrimReplace = '$1$2$3'
|
var comparatorTrimReplace = '$1$2$3'
|
||||||
|
|
||||||
// Something like `1.2.3 - 1.2.4`
|
// Something like `1.2.3 - 1.2.4`
|
||||||
@@ -61309,6 +61341,14 @@ for (var i = 0; i < R; i++) {
|
|||||||
debug(i, src[i])
|
debug(i, src[i])
|
||||||
if (!re[i]) {
|
if (!re[i]) {
|
||||||
re[i] = new RegExp(src[i])
|
re[i] = new RegExp(src[i])
|
||||||
|
|
||||||
|
// Replace all greedy whitespace to prevent regex dos issues. These regex are
|
||||||
|
// used internally via the safeRe object since all inputs in this library get
|
||||||
|
// normalized first to trim and collapse all extra whitespace. The original
|
||||||
|
// regexes are exported for userland consumption and lower level usage. A
|
||||||
|
// future breaking change could export the safer regex only with a note that
|
||||||
|
// all input should have extra whitespace removed.
|
||||||
|
safeRe[i] = new RegExp(makeSafeRe(src[i]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61333,7 +61373,7 @@ function parse (version, options) {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
var r = options.loose ? re[t.LOOSE] : re[t.FULL]
|
var r = options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]
|
||||||
if (!r.test(version)) {
|
if (!r.test(version)) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
@@ -61388,7 +61428,7 @@ function SemVer (version, options) {
|
|||||||
this.options = options
|
this.options = options
|
||||||
this.loose = !!options.loose
|
this.loose = !!options.loose
|
||||||
|
|
||||||
var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])
|
var m = version.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL])
|
||||||
|
|
||||||
if (!m) {
|
if (!m) {
|
||||||
throw new TypeError('Invalid Version: ' + version)
|
throw new TypeError('Invalid Version: ' + version)
|
||||||
@@ -61833,6 +61873,7 @@ function Comparator (comp, options) {
|
|||||||
return new Comparator(comp, options)
|
return new Comparator(comp, options)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
comp = comp.trim().split(/\s+/).join(' ')
|
||||||
debug('comparator', comp, options)
|
debug('comparator', comp, options)
|
||||||
this.options = options
|
this.options = options
|
||||||
this.loose = !!options.loose
|
this.loose = !!options.loose
|
||||||
@@ -61849,7 +61890,7 @@ function Comparator (comp, options) {
|
|||||||
|
|
||||||
var ANY = {}
|
var ANY = {}
|
||||||
Comparator.prototype.parse = function (comp) {
|
Comparator.prototype.parse = function (comp) {
|
||||||
var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
|
var r = this.options.loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]
|
||||||
var m = comp.match(r)
|
var m = comp.match(r)
|
||||||
|
|
||||||
if (!m) {
|
if (!m) {
|
||||||
@@ -61973,9 +62014,16 @@ function Range (range, options) {
|
|||||||
this.loose = !!options.loose
|
this.loose = !!options.loose
|
||||||
this.includePrerelease = !!options.includePrerelease
|
this.includePrerelease = !!options.includePrerelease
|
||||||
|
|
||||||
// First, split based on boolean or ||
|
// First reduce all whitespace as much as possible so we do not have to rely
|
||||||
|
// on potentially slow regexes like \s*. This is then stored and used for
|
||||||
|
// future error messages as well.
|
||||||
this.raw = range
|
this.raw = range
|
||||||
this.set = range.split(/\s*\|\|\s*/).map(function (range) {
|
.trim()
|
||||||
|
.split(/\s+/)
|
||||||
|
.join(' ')
|
||||||
|
|
||||||
|
// First, split based on boolean or ||
|
||||||
|
this.set = this.raw.split('||').map(function (range) {
|
||||||
return this.parseRange(range.trim())
|
return this.parseRange(range.trim())
|
||||||
}, this).filter(function (c) {
|
}, this).filter(function (c) {
|
||||||
// throw out any that are not relevant for whatever reason
|
// throw out any that are not relevant for whatever reason
|
||||||
@@ -61983,7 +62031,7 @@ function Range (range, options) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (!this.set.length) {
|
if (!this.set.length) {
|
||||||
throw new TypeError('Invalid SemVer Range: ' + range)
|
throw new TypeError('Invalid SemVer Range: ' + this.raw)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.format()
|
this.format()
|
||||||
@@ -62002,20 +62050,19 @@ Range.prototype.toString = function () {
|
|||||||
|
|
||||||
Range.prototype.parseRange = function (range) {
|
Range.prototype.parseRange = function (range) {
|
||||||
var loose = this.options.loose
|
var loose = this.options.loose
|
||||||
range = range.trim()
|
|
||||||
// `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
|
// `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
|
||||||
var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]
|
var hr = loose ? safeRe[t.HYPHENRANGELOOSE] : safeRe[t.HYPHENRANGE]
|
||||||
range = range.replace(hr, hyphenReplace)
|
range = range.replace(hr, hyphenReplace)
|
||||||
debug('hyphen replace', range)
|
debug('hyphen replace', range)
|
||||||
// `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
|
// `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
|
||||||
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)
|
range = range.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace)
|
||||||
debug('comparator trim', range, re[t.COMPARATORTRIM])
|
debug('comparator trim', range, safeRe[t.COMPARATORTRIM])
|
||||||
|
|
||||||
// `~ 1.2.3` => `~1.2.3`
|
// `~ 1.2.3` => `~1.2.3`
|
||||||
range = range.replace(re[t.TILDETRIM], tildeTrimReplace)
|
range = range.replace(safeRe[t.TILDETRIM], tildeTrimReplace)
|
||||||
|
|
||||||
// `^ 1.2.3` => `^1.2.3`
|
// `^ 1.2.3` => `^1.2.3`
|
||||||
range = range.replace(re[t.CARETTRIM], caretTrimReplace)
|
range = range.replace(safeRe[t.CARETTRIM], caretTrimReplace)
|
||||||
|
|
||||||
// normalize spaces
|
// normalize spaces
|
||||||
range = range.split(/\s+/).join(' ')
|
range = range.split(/\s+/).join(' ')
|
||||||
@@ -62023,7 +62070,7 @@ Range.prototype.parseRange = function (range) {
|
|||||||
// At this point, the range is completely trimmed and
|
// At this point, the range is completely trimmed and
|
||||||
// ready to be split into comparators.
|
// ready to be split into comparators.
|
||||||
|
|
||||||
var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
|
var compRe = loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]
|
||||||
var set = range.split(' ').map(function (comp) {
|
var set = range.split(' ').map(function (comp) {
|
||||||
return parseComparator(comp, this.options)
|
return parseComparator(comp, this.options)
|
||||||
}, this).join(' ').split(/\s+/)
|
}, this).join(' ').split(/\s+/)
|
||||||
@@ -62123,7 +62170,7 @@ function replaceTildes (comp, options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function replaceTilde (comp, options) {
|
function replaceTilde (comp, options) {
|
||||||
var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]
|
var r = options.loose ? safeRe[t.TILDELOOSE] : safeRe[t.TILDE]
|
||||||
return comp.replace(r, function (_, M, m, p, pr) {
|
return comp.replace(r, function (_, M, m, p, pr) {
|
||||||
debug('tilde', comp, _, M, m, p, pr)
|
debug('tilde', comp, _, M, m, p, pr)
|
||||||
var ret
|
var ret
|
||||||
@@ -62164,7 +62211,7 @@ function replaceCarets (comp, options) {
|
|||||||
|
|
||||||
function replaceCaret (comp, options) {
|
function replaceCaret (comp, options) {
|
||||||
debug('caret', comp, options)
|
debug('caret', comp, options)
|
||||||
var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]
|
var r = options.loose ? safeRe[t.CARETLOOSE] : safeRe[t.CARET]
|
||||||
return comp.replace(r, function (_, M, m, p, pr) {
|
return comp.replace(r, function (_, M, m, p, pr) {
|
||||||
debug('caret', comp, _, M, m, p, pr)
|
debug('caret', comp, _, M, m, p, pr)
|
||||||
var ret
|
var ret
|
||||||
@@ -62223,7 +62270,7 @@ function replaceXRanges (comp, options) {
|
|||||||
|
|
||||||
function replaceXRange (comp, options) {
|
function replaceXRange (comp, options) {
|
||||||
comp = comp.trim()
|
comp = comp.trim()
|
||||||
var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]
|
var r = options.loose ? safeRe[t.XRANGELOOSE] : safeRe[t.XRANGE]
|
||||||
return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
|
return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
|
||||||
debug('xRange', comp, ret, gtlt, M, m, p, pr)
|
debug('xRange', comp, ret, gtlt, M, m, p, pr)
|
||||||
var xM = isX(M)
|
var xM = isX(M)
|
||||||
@@ -62298,7 +62345,7 @@ function replaceXRange (comp, options) {
|
|||||||
function replaceStars (comp, options) {
|
function replaceStars (comp, options) {
|
||||||
debug('replaceStars', comp, options)
|
debug('replaceStars', comp, options)
|
||||||
// Looseness is ignored here. star is always as loose as it gets!
|
// Looseness is ignored here. star is always as loose as it gets!
|
||||||
return comp.trim().replace(re[t.STAR], '')
|
return comp.trim().replace(safeRe[t.STAR], '')
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function is passed to string.replace(re[t.HYPHENRANGE])
|
// This function is passed to string.replace(re[t.HYPHENRANGE])
|
||||||
@@ -62624,7 +62671,7 @@ function coerce (version, options) {
|
|||||||
|
|
||||||
var match = null
|
var match = null
|
||||||
if (!options.rtl) {
|
if (!options.rtl) {
|
||||||
match = version.match(re[t.COERCE])
|
match = version.match(safeRe[t.COERCE])
|
||||||
} else {
|
} else {
|
||||||
// Find the right-most coercible string that does not share
|
// Find the right-most coercible string that does not share
|
||||||
// a terminus with a more left-ward coercible string.
|
// a terminus with a more left-ward coercible string.
|
||||||
@@ -62635,17 +62682,17 @@ function coerce (version, options) {
|
|||||||
// Stop when we get a match that ends at the string end, since no
|
// Stop when we get a match that ends at the string end, since no
|
||||||
// coercible string can be more right-ward without the same terminus.
|
// coercible string can be more right-ward without the same terminus.
|
||||||
var next
|
var next
|
||||||
while ((next = re[t.COERCERTL].exec(version)) &&
|
while ((next = safeRe[t.COERCERTL].exec(version)) &&
|
||||||
(!match || match.index + match[0].length !== version.length)
|
(!match || match.index + match[0].length !== version.length)
|
||||||
) {
|
) {
|
||||||
if (!match ||
|
if (!match ||
|
||||||
next.index + next[0].length !== match.index + match[0].length) {
|
next.index + next[0].length !== match.index + match[0].length) {
|
||||||
match = next
|
match = next
|
||||||
}
|
}
|
||||||
re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length
|
safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length
|
||||||
}
|
}
|
||||||
// leave it in a clean state
|
// leave it in a clean state
|
||||||
re[t.COERCERTL].lastIndex = -1
|
safeRe[t.COERCERTL].lastIndex = -1
|
||||||
}
|
}
|
||||||
|
|
||||||
if (match === null) {
|
if (match === null) {
|
||||||
@@ -73053,9 +73100,9 @@ function setup(option) {
|
|||||||
core.info('Enabling dependency graph generation');
|
core.info('Enabling dependency graph generation');
|
||||||
const jobCorrelator = getJobCorrelator();
|
const jobCorrelator = getJobCorrelator();
|
||||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_ENABLED', 'true');
|
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_ENABLED', 'true');
|
||||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_JOB_CORRELATOR', jobCorrelator);
|
core.exportVariable('GITHUB_JOB_CORRELATOR', jobCorrelator);
|
||||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_JOB_ID', github.context.runId);
|
core.exportVariable('GITHUB_JOB_ID', github.context.runId);
|
||||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_REPORT_DIR', path.resolve(layout.workspaceDirectory(), 'dependency-graph-reports'));
|
core.exportVariable('DEPENDENCY_GRAPH_REPORT_DIR', path.resolve(layout.workspaceDirectory(), 'dependency-graph-reports'));
|
||||||
}
|
}
|
||||||
exports.setup = setup;
|
exports.setup = setup;
|
||||||
function complete(option) {
|
function complete(option) {
|
||||||
|
2
dist/post/index.js.map
vendored
2
dist/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
168
package-lock.json
generated
168
package-lock.json
generated
@@ -22,10 +22,10 @@
|
|||||||
"string-argv": "0.3.2"
|
"string-argv": "0.3.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "29.5.2",
|
"@types/jest": "29.5.3",
|
||||||
"@types/node": "16.11.21",
|
"@types/node": "16.11.21",
|
||||||
"@types/unzipper": "0.10.6",
|
"@types/unzipper": "0.10.6",
|
||||||
"@typescript-eslint/parser": "5.61.0",
|
"@typescript-eslint/parser": "5.62.0",
|
||||||
"@vercel/ncc": "0.36.1",
|
"@vercel/ncc": "0.36.1",
|
||||||
"eslint": "8.44.0",
|
"eslint": "8.44.0",
|
||||||
"eslint-plugin-github": "4.8.0",
|
"eslint-plugin-github": "4.8.0",
|
||||||
@@ -1908,9 +1908,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/jest": {
|
"node_modules/@types/jest": {
|
||||||
"version": "29.5.2",
|
"version": "29.5.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.3.tgz",
|
||||||
"integrity": "sha512-mSoZVJF5YzGVCk+FsDxzDuH7s+SCkzrgKZzf0Z0T2WudhBUPoF6ktoTPC4R0ZoCPCV5xUvuU6ias5NvxcBcMMg==",
|
"integrity": "sha512-1Nq7YrO/vJE/FYnqYyw0FS8LdrjExSgIiHyKg7xPpn+yi8Q4huZryKnkJatN1ZRH89Kw2v33/8ZMB7DuZeSLlA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"expect": "^29.0.0",
|
"expect": "^29.0.0",
|
||||||
@@ -2052,9 +2052,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": {
|
"node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": {
|
||||||
"version": "7.3.8",
|
"version": "7.5.4",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
|
||||||
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lru-cache": "^6.0.0"
|
"lru-cache": "^6.0.0"
|
||||||
@@ -2073,14 +2073,14 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/parser": {
|
"node_modules/@typescript-eslint/parser": {
|
||||||
"version": "5.61.0",
|
"version": "5.62.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.61.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz",
|
||||||
"integrity": "sha512-yGr4Sgyh8uO6fSi9hw3jAFXNBHbCtKKFMdX2IkT3ZqpKmtAq3lHS4ixB/COFuAIJpwl9/AqF7j72ZDWYKmIfvg==",
|
"integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/scope-manager": "5.61.0",
|
"@typescript-eslint/scope-manager": "5.62.0",
|
||||||
"@typescript-eslint/types": "5.61.0",
|
"@typescript-eslint/types": "5.62.0",
|
||||||
"@typescript-eslint/typescript-estree": "5.61.0",
|
"@typescript-eslint/typescript-estree": "5.62.0",
|
||||||
"debug": "^4.3.4"
|
"debug": "^4.3.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -2100,13 +2100,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": {
|
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": {
|
||||||
"version": "5.61.0",
|
"version": "5.62.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.61.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz",
|
||||||
"integrity": "sha512-W8VoMjoSg7f7nqAROEmTt6LoBpn81AegP7uKhhW5KzYlehs8VV0ZW0fIDVbcZRcaP3aPSW+JZFua+ysQN+m/Nw==",
|
"integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "5.61.0",
|
"@typescript-eslint/types": "5.62.0",
|
||||||
"@typescript-eslint/visitor-keys": "5.61.0"
|
"@typescript-eslint/visitor-keys": "5.62.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||||
@@ -2117,9 +2117,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": {
|
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": {
|
||||||
"version": "5.61.0",
|
"version": "5.62.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.61.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz",
|
||||||
"integrity": "sha512-ldyueo58KjngXpzloHUog/h9REmHl59G1b3a5Sng1GfBo14BkS3ZbMEb3693gnP1k//97lh7bKsp6/V/0v1veQ==",
|
"integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||||
@@ -2130,13 +2130,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": {
|
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": {
|
||||||
"version": "5.61.0",
|
"version": "5.62.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.61.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz",
|
||||||
"integrity": "sha512-Fud90PxONnnLZ36oR5ClJBLTLfU4pIWBmnvGwTbEa2cXIqj70AEDEmOmpkFComjBZ/037ueKrOdHuYmSFVD7Rw==",
|
"integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "5.61.0",
|
"@typescript-eslint/types": "5.62.0",
|
||||||
"@typescript-eslint/visitor-keys": "5.61.0",
|
"@typescript-eslint/visitor-keys": "5.62.0",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"globby": "^11.1.0",
|
"globby": "^11.1.0",
|
||||||
"is-glob": "^4.0.3",
|
"is-glob": "^4.0.3",
|
||||||
@@ -2157,12 +2157,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": {
|
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": {
|
||||||
"version": "5.61.0",
|
"version": "5.62.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.61.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz",
|
||||||
"integrity": "sha512-50XQ5VdbWrX06mQXhy93WywSFZZGsv3EOjq+lqp6WC2t+j3mb6A9xYVdrRxafvK88vg9k9u+CT4l6D8PEatjKg==",
|
"integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "5.61.0",
|
"@typescript-eslint/types": "5.62.0",
|
||||||
"eslint-visitor-keys": "^3.3.0"
|
"eslint-visitor-keys": "^3.3.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -2303,9 +2303,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/typescript-estree/node_modules/semver": {
|
"node_modules/@typescript-eslint/typescript-estree/node_modules/semver": {
|
||||||
"version": "7.3.8",
|
"version": "7.5.4",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
|
||||||
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lru-cache": "^6.0.0"
|
"lru-cache": "^6.0.0"
|
||||||
@@ -2384,9 +2384,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/utils/node_modules/semver": {
|
"node_modules/@typescript-eslint/utils/node_modules/semver": {
|
||||||
"version": "7.3.8",
|
"version": "7.5.4",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
|
||||||
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lru-cache": "^6.0.0"
|
"lru-cache": "^6.0.0"
|
||||||
@@ -6394,9 +6394,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/patch-package/node_modules/semver": {
|
"node_modules/patch-package/node_modules/semver": {
|
||||||
"version": "5.7.1",
|
"version": "5.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
|
||||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
"integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"semver": "bin/semver"
|
"semver": "bin/semver"
|
||||||
@@ -6859,9 +6859,9 @@
|
|||||||
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
|
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
|
||||||
},
|
},
|
||||||
"node_modules/semver": {
|
"node_modules/semver": {
|
||||||
"version": "6.3.0",
|
"version": "6.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||||
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
|
||||||
"bin": {
|
"bin": {
|
||||||
"semver": "bin/semver.js"
|
"semver": "bin/semver.js"
|
||||||
}
|
}
|
||||||
@@ -9258,9 +9258,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/jest": {
|
"@types/jest": {
|
||||||
"version": "29.5.2",
|
"version": "29.5.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.3.tgz",
|
||||||
"integrity": "sha512-mSoZVJF5YzGVCk+FsDxzDuH7s+SCkzrgKZzf0Z0T2WudhBUPoF6ktoTPC4R0ZoCPCV5xUvuU6ias5NvxcBcMMg==",
|
"integrity": "sha512-1Nq7YrO/vJE/FYnqYyw0FS8LdrjExSgIiHyKg7xPpn+yi8Q4huZryKnkJatN1ZRH89Kw2v33/8ZMB7DuZeSLlA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"expect": "^29.0.0",
|
"expect": "^29.0.0",
|
||||||
@@ -9382,9 +9382,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"semver": {
|
"semver": {
|
||||||
"version": "7.3.8",
|
"version": "7.5.4",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
|
||||||
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"lru-cache": "^6.0.0"
|
"lru-cache": "^6.0.0"
|
||||||
@@ -9399,41 +9399,41 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/parser": {
|
"@typescript-eslint/parser": {
|
||||||
"version": "5.61.0",
|
"version": "5.62.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.61.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz",
|
||||||
"integrity": "sha512-yGr4Sgyh8uO6fSi9hw3jAFXNBHbCtKKFMdX2IkT3ZqpKmtAq3lHS4ixB/COFuAIJpwl9/AqF7j72ZDWYKmIfvg==",
|
"integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/scope-manager": "5.61.0",
|
"@typescript-eslint/scope-manager": "5.62.0",
|
||||||
"@typescript-eslint/types": "5.61.0",
|
"@typescript-eslint/types": "5.62.0",
|
||||||
"@typescript-eslint/typescript-estree": "5.61.0",
|
"@typescript-eslint/typescript-estree": "5.62.0",
|
||||||
"debug": "^4.3.4"
|
"debug": "^4.3.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/scope-manager": {
|
"@typescript-eslint/scope-manager": {
|
||||||
"version": "5.61.0",
|
"version": "5.62.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.61.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz",
|
||||||
"integrity": "sha512-W8VoMjoSg7f7nqAROEmTt6LoBpn81AegP7uKhhW5KzYlehs8VV0ZW0fIDVbcZRcaP3aPSW+JZFua+ysQN+m/Nw==",
|
"integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/types": "5.61.0",
|
"@typescript-eslint/types": "5.62.0",
|
||||||
"@typescript-eslint/visitor-keys": "5.61.0"
|
"@typescript-eslint/visitor-keys": "5.62.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/types": {
|
"@typescript-eslint/types": {
|
||||||
"version": "5.61.0",
|
"version": "5.62.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.61.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz",
|
||||||
"integrity": "sha512-ldyueo58KjngXpzloHUog/h9REmHl59G1b3a5Sng1GfBo14BkS3ZbMEb3693gnP1k//97lh7bKsp6/V/0v1veQ==",
|
"integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@typescript-eslint/typescript-estree": {
|
"@typescript-eslint/typescript-estree": {
|
||||||
"version": "5.61.0",
|
"version": "5.62.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.61.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz",
|
||||||
"integrity": "sha512-Fud90PxONnnLZ36oR5ClJBLTLfU4pIWBmnvGwTbEa2cXIqj70AEDEmOmpkFComjBZ/037ueKrOdHuYmSFVD7Rw==",
|
"integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/types": "5.61.0",
|
"@typescript-eslint/types": "5.62.0",
|
||||||
"@typescript-eslint/visitor-keys": "5.61.0",
|
"@typescript-eslint/visitor-keys": "5.62.0",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"globby": "^11.1.0",
|
"globby": "^11.1.0",
|
||||||
"is-glob": "^4.0.3",
|
"is-glob": "^4.0.3",
|
||||||
@@ -9442,12 +9442,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/visitor-keys": {
|
"@typescript-eslint/visitor-keys": {
|
||||||
"version": "5.61.0",
|
"version": "5.62.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.61.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz",
|
||||||
"integrity": "sha512-50XQ5VdbWrX06mQXhy93WywSFZZGsv3EOjq+lqp6WC2t+j3mb6A9xYVdrRxafvK88vg9k9u+CT4l6D8PEatjKg==",
|
"integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/types": "5.61.0",
|
"@typescript-eslint/types": "5.62.0",
|
||||||
"eslint-visitor-keys": "^3.3.0"
|
"eslint-visitor-keys": "^3.3.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -9530,9 +9530,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"semver": {
|
"semver": {
|
||||||
"version": "7.3.8",
|
"version": "7.5.4",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
|
||||||
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"lru-cache": "^6.0.0"
|
"lru-cache": "^6.0.0"
|
||||||
@@ -9588,9 +9588,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"semver": {
|
"semver": {
|
||||||
"version": "7.3.8",
|
"version": "7.5.4",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
|
||||||
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"lru-cache": "^6.0.0"
|
"lru-cache": "^6.0.0"
|
||||||
@@ -12500,9 +12500,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"semver": {
|
"semver": {
|
||||||
"version": "5.7.1",
|
"version": "5.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
|
||||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
"integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"slash": {
|
"slash": {
|
||||||
@@ -12805,9 +12805,9 @@
|
|||||||
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
|
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
|
||||||
},
|
},
|
||||||
"semver": {
|
"semver": {
|
||||||
"version": "6.3.0",
|
"version": "6.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||||
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
|
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="
|
||||||
},
|
},
|
||||||
"shebang-command": {
|
"shebang-command": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
|
@@ -43,9 +43,9 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "16.11.21",
|
"@types/node": "16.11.21",
|
||||||
"@types/jest": "29.5.2",
|
"@types/jest": "29.5.3",
|
||||||
"@types/unzipper": "0.10.6",
|
"@types/unzipper": "0.10.6",
|
||||||
"@typescript-eslint/parser": "5.61.0",
|
"@typescript-eslint/parser": "5.62.0",
|
||||||
"@vercel/ncc": "0.36.1",
|
"@vercel/ncc": "0.36.1",
|
||||||
"eslint": "8.44.0",
|
"eslint": "8.44.0",
|
||||||
"eslint-plugin-github": "4.8.0",
|
"eslint-plugin-github": "4.8.0",
|
||||||
|
@@ -21,10 +21,10 @@ export function setup(option: DependencyGraphOption): void {
|
|||||||
core.info('Enabling dependency graph generation')
|
core.info('Enabling dependency graph generation')
|
||||||
const jobCorrelator = getJobCorrelator()
|
const jobCorrelator = getJobCorrelator()
|
||||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_ENABLED', 'true')
|
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_ENABLED', 'true')
|
||||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_JOB_CORRELATOR', jobCorrelator)
|
core.exportVariable('GITHUB_JOB_CORRELATOR', jobCorrelator)
|
||||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_JOB_ID', github.context.runId)
|
core.exportVariable('GITHUB_JOB_ID', github.context.runId)
|
||||||
core.exportVariable(
|
core.exportVariable(
|
||||||
'GITHUB_DEPENDENCY_GRAPH_REPORT_DIR',
|
'DEPENDENCY_GRAPH_REPORT_DIR',
|
||||||
path.resolve(layout.workspaceDirectory(), 'dependency-graph-reports')
|
path.resolve(layout.workspaceDirectory(), 'dependency-graph-reports')
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@@ -1,12 +1,11 @@
|
|||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import * as exec from '@actions/exec'
|
import * as exec from '@actions/exec'
|
||||||
import fs from 'fs'
|
|
||||||
import * as gradlew from './gradlew'
|
import * as gradlew from './gradlew'
|
||||||
|
|
||||||
export async function executeGradleBuild(executable: string | undefined, root: string, args: string[]): Promise<void> {
|
export async function executeGradleBuild(executable: string | undefined, root: string, args: string[]): Promise<void> {
|
||||||
// Use the provided executable, or look for a Gradle wrapper script to run
|
// Use the provided executable, or look for a Gradle wrapper script to run
|
||||||
const toExecute = executable ?? gradlew.locateGradleWrapperScript(root)
|
const toExecute = executable ?? gradlew.gradleWrapperScript(root)
|
||||||
verifyIsExecutableScript(toExecute)
|
|
||||||
const status: number = await exec.exec(toExecute, args, {
|
const status: number = await exec.exec(toExecute, args, {
|
||||||
cwd: root,
|
cwd: root,
|
||||||
ignoreReturnCode: true
|
ignoreReturnCode: true
|
||||||
@@ -16,11 +15,3 @@ export async function executeGradleBuild(executable: string | undefined, root: s
|
|||||||
core.setFailed(`Gradle build failed: see console output for details`)
|
core.setFailed(`Gradle build failed: see console output for details`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function verifyIsExecutableScript(toExecute: string): void {
|
|
||||||
try {
|
|
||||||
fs.accessSync(toExecute, fs.constants.X_OK)
|
|
||||||
} catch (err) {
|
|
||||||
throw new Error(`Gradle script '${toExecute}' is not executable.`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@@ -4,23 +4,39 @@ import fs from 'fs'
|
|||||||
const IS_WINDOWS = process.platform === 'win32'
|
const IS_WINDOWS = process.platform === 'win32'
|
||||||
|
|
||||||
export function wrapperScriptFilename(): string {
|
export function wrapperScriptFilename(): string {
|
||||||
return IS_WINDOWS ? 'gradlew.bat' : 'gradlew'
|
return IS_WINDOWS ? './gradlew.bat' : './gradlew'
|
||||||
}
|
}
|
||||||
|
|
||||||
export function installScriptFilename(): string {
|
export function installScriptFilename(): string {
|
||||||
return IS_WINDOWS ? 'gradle.bat' : 'gradle'
|
return IS_WINDOWS ? 'gradle.bat' : 'gradle'
|
||||||
}
|
}
|
||||||
|
|
||||||
export function locateGradleWrapperScript(buildRootDirectory: string): string {
|
export function gradleWrapperScript(buildRootDirectory: string): string {
|
||||||
validateGradleWrapper(buildRootDirectory)
|
validateGradleWrapper(buildRootDirectory)
|
||||||
return path.resolve(buildRootDirectory, wrapperScriptFilename())
|
return wrapperScriptFilename()
|
||||||
}
|
}
|
||||||
|
|
||||||
function validateGradleWrapper(buildRootDirectory: string): void {
|
function validateGradleWrapper(buildRootDirectory: string): void {
|
||||||
|
const wrapperScript = path.resolve(buildRootDirectory, wrapperScriptFilename())
|
||||||
|
verifyExists(wrapperScript, 'Gradle Wrapper script')
|
||||||
|
verifyIsExecutableScript(wrapperScript)
|
||||||
|
|
||||||
const wrapperProperties = path.resolve(buildRootDirectory, 'gradle/wrapper/gradle-wrapper.properties')
|
const wrapperProperties = path.resolve(buildRootDirectory, 'gradle/wrapper/gradle-wrapper.properties')
|
||||||
if (!fs.existsSync(wrapperProperties)) {
|
verifyExists(wrapperProperties, 'Gradle wrapper properties file')
|
||||||
|
}
|
||||||
|
|
||||||
|
function verifyExists(file: string, description: string): void {
|
||||||
|
if (!fs.existsSync(file)) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Cannot locate a Gradle wrapper properties file at '${wrapperProperties}'. Specify 'gradle-version' or 'gradle-executable' for projects without Gradle wrapper configured.`
|
`Cannot locate ${description} at '${file}'. Specify 'gradle-version' or 'gradle-executable' for projects without Gradle wrapper configured.`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function verifyIsExecutableScript(toExecute: string): void {
|
||||||
|
try {
|
||||||
|
fs.accessSync(toExecute, fs.constants.X_OK)
|
||||||
|
} catch (err) {
|
||||||
|
throw new Error(`Gradle script '${toExecute}' is not executable.`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -3,7 +3,7 @@ buildscript {
|
|||||||
maven { url "https://plugins.gradle.org/m2/" }
|
maven { url "https://plugins.gradle.org/m2/" }
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath "org.gradle:github-dependency-graph-gradle-plugin:0.0.5"
|
classpath "org.gradle:github-dependency-graph-gradle-plugin:0.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
apply plugin: org.gradle.github.GitHubDependencyGraphPlugin
|
apply plugin: org.gradle.github.GitHubDependencyGraphPlugin
|
||||||
|
@@ -1,24 +1,53 @@
|
|||||||
import org.gradle.util.GradleVersion
|
import org.gradle.util.GradleVersion
|
||||||
|
|
||||||
|
// Only run when dependency graph is explicitly enabled
|
||||||
if (System.env.GITHUB_DEPENDENCY_GRAPH_ENABLED != "true") {
|
if (System.env.GITHUB_DEPENDENCY_GRAPH_ENABLED != "true") {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Do not run for unsupported versions of Gradle
|
||||||
if (GradleVersion.current().baseVersion < GradleVersion.version("5.0")) {
|
if (GradleVersion.current().baseVersion < GradleVersion.version("5.0")) {
|
||||||
println "::warning::Dependency Graph is not supported for Gradle versions < 5.0. No dependency snapshot will be generated."
|
println "::warning::Dependency Graph is not supported for Gradle versions < 5.0. No dependency snapshot will be generated."
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
def reportDir = System.env.GITHUB_DEPENDENCY_GRAPH_REPORT_DIR
|
// Attempt to find a unique job correlator to use based on the environment variable
|
||||||
def jobCorrelator = System.env.GITHUB_DEPENDENCY_GRAPH_JOB_CORRELATOR
|
// This is only required for top-level builds
|
||||||
def reportFile = new File(reportDir, jobCorrelator + ".json")
|
def isTopLevelBuild = gradle.getParent() == null
|
||||||
|
if (isTopLevelBuild) {
|
||||||
|
def jobCorrelator = ensureUniqueJobCorrelator(System.env.GITHUB_JOB_CORRELATOR)
|
||||||
|
|
||||||
if (reportFile.exists()) {
|
if (jobCorrelator == null) {
|
||||||
println "::warning::No dependency snapshot generated for step: report file for '${jobCorrelator}' created in earlier step. Each build invocation requires a unique job correlator: specify GITHUB_DEPENDENCY_GRAPH_JOB_CORRELATOR var for this step."
|
println "::warning::No dependency snapshot generated for step: report file for '${jobCorrelator}' created in earlier step. Each build invocation requires a unique job correlator: specify GITHUB_JOB_CORRELATOR var for this step."
|
||||||
return
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
println "Generating dependency graph for '${jobCorrelator}'"
|
||||||
}
|
}
|
||||||
|
|
||||||
println "Generating dependency graph for '${jobCorrelator}'"
|
|
||||||
|
|
||||||
// TODO:DAZ This should be conditionally applied, since the script may be present when not required.
|
|
||||||
apply from: 'github-dependency-graph-gradle-plugin-apply.groovy'
|
apply from: 'github-dependency-graph-gradle-plugin-apply.groovy'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Using the supplied jobCorrelator value:
|
||||||
|
* - Checks if report file already exists
|
||||||
|
* - If so, tries to find a unique value that does not yet have a corresponding report file.
|
||||||
|
* - When found, this value is set as a System property override.
|
||||||
|
*/
|
||||||
|
String ensureUniqueJobCorrelator(String jobCorrelator) {
|
||||||
|
def reportDir = System.env.DEPENDENCY_GRAPH_REPORT_DIR
|
||||||
|
def reportFile = new File(reportDir, jobCorrelator + ".json")
|
||||||
|
if (!reportFile.exists()) return jobCorrelator
|
||||||
|
|
||||||
|
// Try at most 100 suffixes
|
||||||
|
for (int i = 1; i < 100; i++) {
|
||||||
|
def candidateCorrelator = jobCorrelator + "-" + i
|
||||||
|
def candidateFile = new File(reportDir, candidateCorrelator + ".json")
|
||||||
|
if (!candidateFile.exists()) {
|
||||||
|
System.properties['GITHUB_JOB_CORRELATOR'] = candidateCorrelator
|
||||||
|
return candidateCorrelator
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Could not determine unique job correlator
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=38f66cd6eef217b4c35855bb11ea4e9fbc53594ccccb5fb82dfd317ef8c2c5a3
|
distributionSha256Sum=03ec176d388f2aa99defcadc3ac6adf8dd2bce5145a129659537c0874dea5ad1
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
@@ -24,7 +24,7 @@ class BaseInitScriptTest extends Specification {
|
|||||||
static final TestGradleVersion GRADLE_6_X = new TestGradleVersion(GradleVersion.version('6.9.4'), 8, 15)
|
static final TestGradleVersion GRADLE_6_X = new TestGradleVersion(GradleVersion.version('6.9.4'), 8, 15)
|
||||||
static final TestGradleVersion GRADLE_7_X = new TestGradleVersion(GradleVersion.version('7.6.2'), 8, 19)
|
static final TestGradleVersion GRADLE_7_X = new TestGradleVersion(GradleVersion.version('7.6.2'), 8, 19)
|
||||||
static final TestGradleVersion GRADLE_8_0 = new TestGradleVersion(GradleVersion.version('8.0.2'), 8, 19)
|
static final TestGradleVersion GRADLE_8_0 = new TestGradleVersion(GradleVersion.version('8.0.2'), 8, 19)
|
||||||
static final TestGradleVersion GRADLE_8_X = new TestGradleVersion(GradleVersion.version('8.2'), 8, 19)
|
static final TestGradleVersion GRADLE_8_X = new TestGradleVersion(GradleVersion.version('8.2.1'), 8, 19)
|
||||||
|
|
||||||
static final List<TestGradleVersion> ALL_VERSIONS = [
|
static final List<TestGradleVersion> ALL_VERSIONS = [
|
||||||
GRADLE_3_X, // First version where TestKit supports environment variables
|
GRADLE_3_X, // First version where TestKit supports environment variables
|
||||||
|
@@ -8,7 +8,6 @@ class TestDependencyGraph extends BaseInitScriptTest {
|
|||||||
static final List<TestGradleVersion> NO_DEPENDENCY_GRAPH_VERSIONS = [GRADLE_3_X, GRADLE_4_X]
|
static final List<TestGradleVersion> NO_DEPENDENCY_GRAPH_VERSIONS = [GRADLE_3_X, GRADLE_4_X]
|
||||||
static final List<TestGradleVersion> DEPENDENCY_GRAPH_VERSIONS = ALL_VERSIONS - NO_DEPENDENCY_GRAPH_VERSIONS
|
static final List<TestGradleVersion> DEPENDENCY_GRAPH_VERSIONS = ALL_VERSIONS - NO_DEPENDENCY_GRAPH_VERSIONS
|
||||||
|
|
||||||
|
|
||||||
def "does not produce dependency graph when not enabled"() {
|
def "does not produce dependency graph when not enabled"() {
|
||||||
assumeTrue testGradleVersion.compatibleWithCurrentJvm
|
assumeTrue testGradleVersion.compatibleWithCurrentJvm
|
||||||
|
|
||||||
@@ -35,6 +34,20 @@ class TestDependencyGraph extends BaseInitScriptTest {
|
|||||||
testGradleVersion << DEPENDENCY_GRAPH_VERSIONS
|
testGradleVersion << DEPENDENCY_GRAPH_VERSIONS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Dependency-graph plugin doesn't support config-cache for 8.0 of Gradle
|
||||||
|
def "produces dependency graph with configuration-cache on latest Gradle"() {
|
||||||
|
assumeTrue testGradleVersion.compatibleWithCurrentJvm
|
||||||
|
|
||||||
|
when:
|
||||||
|
run(['help'], initScript, testGradleVersion.gradleVersion, [], envVars)
|
||||||
|
|
||||||
|
then:
|
||||||
|
assert reportFile.exists()
|
||||||
|
|
||||||
|
where:
|
||||||
|
testGradleVersion << [GRADLE_8_X]
|
||||||
|
}
|
||||||
|
|
||||||
def "warns and produces no dependency graph when enabled for older Gradle versions"() {
|
def "warns and produces no dependency graph when enabled for older Gradle versions"() {
|
||||||
assumeTrue testGradleVersion.compatibleWithCurrentJvm
|
assumeTrue testGradleVersion.compatibleWithCurrentJvm
|
||||||
|
|
||||||
@@ -49,17 +62,45 @@ class TestDependencyGraph extends BaseInitScriptTest {
|
|||||||
testGradleVersion << NO_DEPENDENCY_GRAPH_VERSIONS
|
testGradleVersion << NO_DEPENDENCY_GRAPH_VERSIONS
|
||||||
}
|
}
|
||||||
|
|
||||||
def "warns and does not overwrite existing report file"() {
|
def "constructs unique job correlator for each build invocation"() {
|
||||||
assumeTrue testGradleVersion.compatibleWithCurrentJvm
|
assumeTrue testGradleVersion.compatibleWithCurrentJvm
|
||||||
|
|
||||||
|
def reportFile1 = new File(reportsDir, "CORRELATOR-1.json")
|
||||||
|
def reportFile2 = new File(reportsDir, "CORRELATOR-2.json")
|
||||||
|
|
||||||
|
buildFile << """
|
||||||
|
task firstTask {
|
||||||
|
doLast {
|
||||||
|
println "First"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
task secondTask {
|
||||||
|
doLast {
|
||||||
|
println "Second"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
|
||||||
when:
|
when:
|
||||||
reportsDir.mkdirs()
|
run(['help'], initScript, testGradleVersion.gradleVersion, [], envVars)
|
||||||
reportFile << "DUMMY CONTENT"
|
|
||||||
def result = run(['help'], initScript, testGradleVersion.gradleVersion, [], envVars)
|
|
||||||
|
|
||||||
then:
|
then:
|
||||||
assert reportFile.text == "DUMMY CONTENT"
|
assert reportFile.exists()
|
||||||
assert result.output.contains("::warning::No dependency snapshot generated for step")
|
|
||||||
|
when:
|
||||||
|
run(['first'], initScript, testGradleVersion.gradleVersion, [], envVars)
|
||||||
|
|
||||||
|
then:
|
||||||
|
assert reportFile.exists()
|
||||||
|
assert reportFile1.exists()
|
||||||
|
|
||||||
|
when:
|
||||||
|
run(['second'], initScript, testGradleVersion.gradleVersion, [], envVars)
|
||||||
|
|
||||||
|
then:
|
||||||
|
assert reportFile.exists()
|
||||||
|
assert reportFile1.exists()
|
||||||
|
assert reportFile2.exists()
|
||||||
|
|
||||||
where:
|
where:
|
||||||
testGradleVersion << DEPENDENCY_GRAPH_VERSIONS
|
testGradleVersion << DEPENDENCY_GRAPH_VERSIONS
|
||||||
@@ -68,12 +109,12 @@ class TestDependencyGraph extends BaseInitScriptTest {
|
|||||||
def getEnvVars() {
|
def getEnvVars() {
|
||||||
return [
|
return [
|
||||||
GITHUB_DEPENDENCY_GRAPH_ENABLED: "true",
|
GITHUB_DEPENDENCY_GRAPH_ENABLED: "true",
|
||||||
GITHUB_DEPENDENCY_GRAPH_JOB_CORRELATOR: "CORRELATOR",
|
GITHUB_JOB_CORRELATOR: "CORRELATOR",
|
||||||
GITHUB_DEPENDENCY_GRAPH_JOB_ID: "1",
|
GITHUB_JOB_ID: "1",
|
||||||
GITHUB_DEPENDENCY_GRAPH_REPORT_DIR: reportsDir.absolutePath,
|
|
||||||
GITHUB_REF: "main",
|
GITHUB_REF: "main",
|
||||||
GITHUB_SHA: "123456",
|
GITHUB_SHA: "123456",
|
||||||
GITHUB_WORKSPACE: testProjectDir.absolutePath
|
GITHUB_WORKSPACE: testProjectDir.absolutePath,
|
||||||
|
DEPENDENCY_GRAPH_REPORT_DIR: reportsDir.absolutePath
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -49,7 +49,7 @@ test('will cleanup unused gradle versions', async () => {
|
|||||||
|
|
||||||
const gradle802 = path.resolve(gradleUserHome, "caches/8.0.2")
|
const gradle802 = path.resolve(gradleUserHome, "caches/8.0.2")
|
||||||
const wrapper802 = path.resolve(gradleUserHome, "wrapper/dists/gradle-8.0.2-bin")
|
const wrapper802 = path.resolve(gradleUserHome, "wrapper/dists/gradle-8.0.2-bin")
|
||||||
const gradleCurrent = path.resolve(gradleUserHome, "caches/8.2")
|
const gradleCurrent = path.resolve(gradleUserHome, "caches/8.2.1")
|
||||||
|
|
||||||
expect(fs.existsSync(gradle802)).toBe(true)
|
expect(fs.existsSync(gradle802)).toBe(true)
|
||||||
expect(fs.existsSync(wrapper802)).toBe(true)
|
expect(fs.existsSync(wrapper802)).toBe(true)
|
||||||
|
Reference in New Issue
Block a user