mirror of
https://github.com/actions/checkout.git
synced 2026-07-05 20:05:36 +00:00
Compare commits
2 Commits
24a04b5104
...
b24bc284f2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b24bc284f2 | ||
|
|
93c131d06b |
@ -45,68 +45,42 @@ describe('git-version tests', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('sparse checkout', async () => {
|
it('sparse checkout', async () => {
|
||||||
expect(
|
const minSparseVer = MinimumGitSparseCheckoutVersion
|
||||||
new GitVersion('1.0').checkMinimum(MinimumGitSparseCheckoutVersion)
|
expect(new GitVersion('1.0').checkMinimum(minSparseVer)).toBeFalsy()
|
||||||
).toBeFalsy()
|
expect(new GitVersion('1.99').checkMinimum(minSparseVer)).toBeFalsy()
|
||||||
expect(
|
expect(new GitVersion('2.0').checkMinimum(minSparseVer)).toBeFalsy()
|
||||||
new GitVersion('1.99').checkMinimum(MinimumGitSparseCheckoutVersion)
|
expect(new GitVersion('2.24').checkMinimum(minSparseVer)).toBeFalsy()
|
||||||
).toBeFalsy()
|
expect(new GitVersion('2.24.0').checkMinimum(minSparseVer)).toBeFalsy()
|
||||||
expect(
|
expect(new GitVersion('2.24.9').checkMinimum(minSparseVer)).toBeFalsy()
|
||||||
new GitVersion('2.24').checkMinimum(MinimumGitSparseCheckoutVersion)
|
expect(new GitVersion('2.25').checkMinimum(minSparseVer)).toBeFalsy()
|
||||||
).toBeFalsy()
|
expect(new GitVersion('2.25.0').checkMinimum(minSparseVer)).toBeFalsy()
|
||||||
expect(
|
expect(new GitVersion('2.25.1').checkMinimum(minSparseVer)).toBeFalsy()
|
||||||
new GitVersion('2.24.0').checkMinimum(MinimumGitSparseCheckoutVersion)
|
expect(new GitVersion('2.25.9').checkMinimum(minSparseVer)).toBeFalsy()
|
||||||
).toBeFalsy()
|
expect(new GitVersion('2.26').checkMinimum(minSparseVer)).toBeFalsy()
|
||||||
expect(
|
expect(new GitVersion('2.26.0').checkMinimum(minSparseVer)).toBeFalsy()
|
||||||
new GitVersion('2.24.1').checkMinimum(MinimumGitSparseCheckoutVersion)
|
expect(new GitVersion('2.26.1').checkMinimum(minSparseVer)).toBeFalsy()
|
||||||
).toBeFalsy()
|
expect(new GitVersion('2.26.9').checkMinimum(minSparseVer)).toBeFalsy()
|
||||||
expect(
|
expect(new GitVersion('2.27').checkMinimum(minSparseVer)).toBeFalsy()
|
||||||
new GitVersion('2.24.9').checkMinimum(MinimumGitSparseCheckoutVersion)
|
expect(new GitVersion('2.27.0').checkMinimum(minSparseVer)).toBeFalsy()
|
||||||
).toBeFalsy()
|
expect(new GitVersion('2.27.1').checkMinimum(minSparseVer)).toBeFalsy()
|
||||||
expect(
|
expect(new GitVersion('2.27.9').checkMinimum(minSparseVer)).toBeFalsy()
|
||||||
new GitVersion('2.25').checkMinimum(MinimumGitSparseCheckoutVersion)
|
// /---------------------------------------
|
||||||
).toBeTruthy()
|
// ^^^ before / after vvv
|
||||||
expect(
|
// --------------------------/
|
||||||
new GitVersion('2.25.0').checkMinimum(MinimumGitSparseCheckoutVersion)
|
expect(new GitVersion('2.28').checkMinimum(minSparseVer)).toBeTruthy()
|
||||||
).toBeTruthy()
|
expect(new GitVersion('2.28.0').checkMinimum(minSparseVer)).toBeTruthy()
|
||||||
expect(
|
expect(new GitVersion('2.28.1').checkMinimum(minSparseVer)).toBeTruthy()
|
||||||
new GitVersion('2.25.1').checkMinimum(MinimumGitSparseCheckoutVersion)
|
expect(new GitVersion('2.28.9').checkMinimum(minSparseVer)).toBeTruthy()
|
||||||
).toBeTruthy()
|
expect(new GitVersion('2.29').checkMinimum(minSparseVer)).toBeTruthy()
|
||||||
expect(
|
expect(new GitVersion('2.29.0').checkMinimum(minSparseVer)).toBeTruthy()
|
||||||
new GitVersion('2.25.9').checkMinimum(MinimumGitSparseCheckoutVersion)
|
expect(new GitVersion('2.29.1').checkMinimum(minSparseVer)).toBeTruthy()
|
||||||
).toBeTruthy()
|
expect(new GitVersion('2.29.9').checkMinimum(minSparseVer)).toBeTruthy()
|
||||||
expect(
|
expect(new GitVersion('2.99').checkMinimum(minSparseVer)).toBeTruthy()
|
||||||
new GitVersion('2.26').checkMinimum(MinimumGitSparseCheckoutVersion)
|
expect(new GitVersion('3.0').checkMinimum(minSparseVer)).toBeTruthy()
|
||||||
).toBeTruthy()
|
expect(new GitVersion('3.99').checkMinimum(minSparseVer)).toBeTruthy()
|
||||||
expect(
|
expect(new GitVersion('4.0').checkMinimum(minSparseVer)).toBeTruthy()
|
||||||
new GitVersion('2.26.0').checkMinimum(MinimumGitSparseCheckoutVersion)
|
expect(new GitVersion('4.99').checkMinimum(minSparseVer)).toBeTruthy()
|
||||||
).toBeTruthy()
|
expect(new GitVersion('5.0').checkMinimum(minSparseVer)).toBeTruthy()
|
||||||
expect(
|
expect(new GitVersion('5.99').checkMinimum(minSparseVer)).toBeTruthy()
|
||||||
new GitVersion('2.26.1').checkMinimum(MinimumGitSparseCheckoutVersion)
|
|
||||||
).toBeTruthy()
|
|
||||||
expect(
|
|
||||||
new GitVersion('2.26.9').checkMinimum(MinimumGitSparseCheckoutVersion)
|
|
||||||
).toBeTruthy()
|
|
||||||
expect(
|
|
||||||
new GitVersion('2.99').checkMinimum(MinimumGitSparseCheckoutVersion)
|
|
||||||
).toBeTruthy()
|
|
||||||
expect(
|
|
||||||
new GitVersion('3.0').checkMinimum(MinimumGitSparseCheckoutVersion)
|
|
||||||
).toBeTruthy()
|
|
||||||
expect(
|
|
||||||
new GitVersion('3.99').checkMinimum(MinimumGitSparseCheckoutVersion)
|
|
||||||
).toBeTruthy()
|
|
||||||
expect(
|
|
||||||
new GitVersion('4.0').checkMinimum(MinimumGitSparseCheckoutVersion)
|
|
||||||
).toBeTruthy()
|
|
||||||
expect(
|
|
||||||
new GitVersion('4.99').checkMinimum(MinimumGitSparseCheckoutVersion)
|
|
||||||
).toBeTruthy()
|
|
||||||
expect(
|
|
||||||
new GitVersion('5.0').checkMinimum(MinimumGitSparseCheckoutVersion)
|
|
||||||
).toBeTruthy()
|
|
||||||
expect(
|
|
||||||
new GitVersion('5.99').checkMinimum(MinimumGitSparseCheckoutVersion)
|
|
||||||
).toBeTruthy()
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
4
dist/index.js
vendored
4
dist/index.js
vendored
@ -480,9 +480,9 @@ const retryHelper = __importStar(__nccwpck_require__(2155));
|
|||||||
const git_version_1 = __nccwpck_require__(3142);
|
const git_version_1 = __nccwpck_require__(3142);
|
||||||
// Auth header not supported before 2.9
|
// Auth header not supported before 2.9
|
||||||
// Wire protocol v2 not supported before 2.18
|
// Wire protocol v2 not supported before 2.18
|
||||||
// sparse-checkout not supported before 2.25
|
// sparse-checkout not [well-]supported before 2.28 (see https://github.com/actions/checkout/issues/1386)
|
||||||
exports.MinimumGitVersion = new git_version_1.GitVersion('2.18');
|
exports.MinimumGitVersion = new git_version_1.GitVersion('2.18');
|
||||||
exports.MinimumGitSparseCheckoutVersion = new git_version_1.GitVersion('2.25');
|
exports.MinimumGitSparseCheckoutVersion = new git_version_1.GitVersion('2.28');
|
||||||
function createCommandManager(workingDirectory, lfs, doSparseCheckout) {
|
function createCommandManager(workingDirectory, lfs, doSparseCheckout) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
return yield GitCommandManager.createCommandManager(workingDirectory, lfs, doSparseCheckout);
|
return yield GitCommandManager.createCommandManager(workingDirectory, lfs, doSparseCheckout);
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "checkout",
|
"name": "checkout",
|
||||||
"version": "4.1.2",
|
"version": "4.1.3",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "checkout",
|
"name": "checkout",
|
||||||
"version": "4.1.2",
|
"version": "4.1.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "checkout",
|
"name": "checkout",
|
||||||
"version": "4.1.2",
|
"version": "4.1.3",
|
||||||
"description": "checkout action",
|
"description": "checkout action",
|
||||||
"main": "lib/main.js",
|
"main": "lib/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -11,9 +11,9 @@ import {GitVersion} from './git-version'
|
|||||||
|
|
||||||
// Auth header not supported before 2.9
|
// Auth header not supported before 2.9
|
||||||
// Wire protocol v2 not supported before 2.18
|
// Wire protocol v2 not supported before 2.18
|
||||||
// sparse-checkout not supported before 2.25
|
// sparse-checkout not [well-]supported before 2.28 (see https://github.com/actions/checkout/issues/1386)
|
||||||
export const MinimumGitVersion = new GitVersion('2.18')
|
export const MinimumGitVersion = new GitVersion('2.18')
|
||||||
export const MinimumGitSparseCheckoutVersion = new GitVersion('2.25')
|
export const MinimumGitSparseCheckoutVersion = new GitVersion('2.28')
|
||||||
|
|
||||||
export interface IGitCommandManager {
|
export interface IGitCommandManager {
|
||||||
branchDelete(remote: boolean, branch: string): Promise<void>
|
branchDelete(remote: boolean, branch: string): Promise<void>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user