diff options
author | Aarni Koskela <akx@iki.fi> | 2024-01-09 14:47:16 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-02-26 14:57:53 +0100 |
commit | 20c563de40923d3333301ca8ed1f3f213a67ea17 (patch) | |
tree | 9da6a86399de77c74aba91e3d48b408b0a8516c2 /misc/hooks/asmessage.applescript | |
parent | bb6b06c81343073f10cbbd2af515cf0dac1e6549 (diff) | |
download | redot-engine-20c563de40923d3333301ca8ed1f3f213a67ea17.tar.gz |
Replace hand-written pre-commit hooks with `pre-commit` Python tool
`pre-commit` can be installed with pip, and configured in the Godot repo with
`pre-commit install`. It can then easily be run both locally with
`pre-commit run`, and on CI, in a cross-platform way.
This makes it much easier for contributors to set up pre-commit hooks,
without having to manually copy files to their git folder.
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
Diffstat (limited to 'misc/hooks/asmessage.applescript')
-rw-r--r-- | misc/hooks/asmessage.applescript | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/misc/hooks/asmessage.applescript b/misc/hooks/asmessage.applescript deleted file mode 100644 index 15ba94dc37..0000000000 --- a/misc/hooks/asmessage.applescript +++ /dev/null @@ -1,59 +0,0 @@ -on run argv - set vButtons to { "OK" } - set vButtonCodes to { 0 } - set vDbutton to "OK" - set vText to "" - set vTitle to "" - set vTimeout to -1 - - repeat with i from 1 to length of argv - try - set vArg to item i of argv - if vArg = "-buttons" then - set vButtonsAndCodes to my fSplit(item (i + 1) of argv, ",") - set vButtons to {} - set vButtonCodes to {} - repeat with j from 1 to length of vButtonsAndCodes - set vBtn to my fSplit(item j of vButtonsAndCodes, ":") - copy (item 1 of vBtn) to the end of the vButtons - copy (item 2 of vBtn) to the end of the vButtonCodes - end repeat - else if vArg = "-title" then - set vTitle to item (i + 1) of argv - else if vArg = "-center" then - -- not supported - else if vArg = "-default" then - set vDbutton to item (i + 1) of argv - else if vArg = "-geometry" then - -- not supported - else if vArg = "-nearmouse" then - -- not supported - else if vArg = "-timeout" then - set vTimeout to item (i + 1) of argv as integer - else if vArg = "-file" then - set vText to read (item (i + 1) of argv) as string - else if vArg = "-text" then - set vText to item (i + 1) of argv - end if - end try - end repeat - - set vDlg to display dialog vText buttons vButtons default button vDbutton with title vTitle giving up after vTimeout with icon stop - set vRet to button returned of vDlg - repeat with i from 1 to length of vButtons - set vBtn to item i of vButtons - if vBtn = vRet - return item i of vButtonCodes - end if - end repeat - - return 0 -end run - -on fSplit(vString, vDelimiter) - set oldDelimiters to AppleScript's text item delimiters - set AppleScript's text item delimiters to vDelimiter - set vArray to every text item of vString - set AppleScript's text item delimiters to oldDelimiters - return vArray -end fSplit |