mirror of
https://github.com/actions/checkout.git
synced 2025-04-01 22:10:06 +02:00
Bump MinimumGitVersion to 2.28 due to #1386
This commit is contained in:
parent
24a04b5104
commit
93c131d06b
3 changed files with 41 additions and 67 deletions
|
@ -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);
|
||||||
|
|
|
@ -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…
Add table
Reference in a new issue