-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix husky scripts not being POSIX compliant
- Loading branch information
Showing
7 changed files
with
90 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* ***************************************************************************** | ||
* Copyright (C) National University of Quilmes 2018-2024 | ||
* Gobstones (TM) is a trademark of the National University of Quilmes. | ||
* | ||
* This program is free software distributed under the terms of the | ||
* GNU Affero General Public License version 3. | ||
* Additional terms added in compliance to section 7 of such license apply. | ||
* | ||
* You may read the full license at https://gobstones.github.io/gobstones-guidelines/LICENSE. | ||
* ***************************************************************************** | ||
*/ | ||
import { run, npx } from '../_/utilities'; | ||
|
||
export default () => { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* ***************************************************************************** | ||
* Copyright (C) National University of Quilmes 2018-2024 | ||
* Gobstones (TM) is a trademark of the National University of Quilmes. | ||
* | ||
* This program is free software distributed under the terms of the | ||
* GNU Affero General Public License version 3. | ||
* Additional terms added in compliance to section 7 of such license apply. | ||
* | ||
* You may read the full license at https://gobstones.github.io/gobstones-guidelines/LICENSE. | ||
* ***************************************************************************** | ||
*/ | ||
import { run, npx } from '../_/utilities'; | ||
|
||
type CommitMessageSource = 'commit' | 'squash' | 'merge' | 'template' | 'message'; | ||
|
||
export default (commitMessageFile: string, commitSource?: CommitMessageSource, sha1?: string) => { | ||
console.log('Function called successfully'); | ||
if ( | ||
isAmend(commitSource, sha1) || | ||
commitSource === 'squash' || | ||
commitSource === 'merge' | ||
) { | ||
return 0; | ||
} | ||
if (commitSource === 'message') { | ||
console.log('Setting a message through -m or -F option in this project ' + | ||
'has been disabled. Please run a simple commit.\n' | ||
); | ||
return 1; | ||
} | ||
if (commitSource === 'template') { | ||
console.log('Setting a template through -t or commit.template in this project ' + | ||
'has been disabled. Please run a simple commit.\n' | ||
); | ||
return 1; | ||
} | ||
return npx('cz', '--hook'); | ||
} | ||
|
||
function isAmend(commitSource?: CommitMessageSource, sha1?: string) { | ||
return commitSource === 'commit' && sha1; | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters