Compare commits

..

2 Commits

Author SHA1 Message Date
John Wesley Walker III
b24bc284f2 Initial prep for release 4.1.3 2024-03-13 21:40:14 +00:00
John Wesley Walker III
93c131d06b Bump MinimumGitVersion to 2.28 due to #1386 2024-03-13 21:05:43 +00:00
5 changed files with 44 additions and 70 deletions

View File

@ -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
View File

@ -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
View File

@ -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",

View File

@ -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": {

View File

@ -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>