Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ source "https://rubygems.org"

gem "fastlane"
gem "slather"
gem "lefthook"
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ GEM
json (2.19.5)
jwt (2.10.2)
base64
lefthook (2.1.6)
logger (1.7.0)
mini_magick (4.13.2)
mini_mime (1.1.5)
Expand Down Expand Up @@ -284,6 +285,7 @@ PLATFORMS

DEPENDENCIES
fastlane
lefthook
slather

CHECKSUMS
Expand Down Expand Up @@ -352,6 +354,7 @@ CHECKSUMS
jmespath (1.6.2) sha256=238d774a58723d6c090494c8879b5e9918c19485f7e840f2c1c7532cf84ebcb1
json (2.19.5) sha256=218a18553e4801d579ca7e0f5bc72bafd776d7397238a1fb4e74db5b0a812c59
jwt (2.10.2) sha256=31e1ee46f7359883d5e622446969fe9c118c3da87a0b1dca765ce269c3a0c4f4
lefthook (2.1.6) sha256=e5c4c46f789c54961de030bf324f3fb38989a6adc944a6e8df50b4d432ebaf1d
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
mini_magick (4.13.2) sha256=71d6258e0e8a3d04a9a0a09784d5d857b403a198a51dd4f882510435eb95ddd9
mini_mime (1.1.5) sha256=8681b7e2e4215f2a159f9400b5816d85e9d8c6c6b491e96a12797e798f8bccef
Expand Down
8 changes: 4 additions & 4 deletions NSAttributedStringBuilder.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
DD46728E2FAE0373002C870E /* Frameworks */,
DD46728F2FAE0373002C870E /* Resources */,
DD4672F92FAE0963002C870E /* Swiftlint Run Script */,
DD4672FA2FAE098A002C870E /* SwiftFormat Commit Hook Run Script */,
DD4672FA2FAE098A002C870E /* Install Commit Hooks Run Script */,
);
buildRules = (
);
Expand Down Expand Up @@ -210,7 +210,7 @@
shellPath = /bin/sh;
shellScript = "if [[ \"$(uname -m)\" == arm64 ]]; then\n export PATH=\"/opt/homebrew/bin:$PATH\"\nfi\n\nif command -v swiftlint >/dev/null 2>&1\nthen\n swiftlint\nelse\n echo \"warning: `swiftlint` command not found - See https://github.com/realm/SwiftLint#installation for installation instructions.\"\nfi\n";
};
DD4672FA2FAE098A002C870E /* SwiftFormat Commit Hook Run Script */ = {
DD4672FA2FAE098A002C870E /* Install Commit Hooks Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand All @@ -219,14 +219,14 @@
);
inputPaths = (
);
name = "SwiftFormat Commit Hook Run Script";
name = "Install Commit Hooks Run Script";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Installs the swift-format pre-commit hook\nbash \"${SRCROOT}/scripts/setup_pre_commit_hook.sh\"\n";
shellScript = "# Installs commit hooks\nif [[ -d \"$HOME/.rbenv\" ]]; then\n export PATH=~/.rbenv/shims:$PATH\n bundle exec lefthook install\nelse\n echo \"warning: Please install rbenv\"\nfi\n";
};
/* End PBXShellScriptBuildPhase section */

Expand Down
7 changes: 7 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pre-commit:
parallel: true
fail_on_changes: "always"
fail_on_changes_diff: false
jobs:
- name: Format Swift files & abort commit if needed
run: swiftformat Sources --config .swiftformat
28 changes: 0 additions & 28 deletions scripts/pre-commit

This file was deleted.

29 changes: 0 additions & 29 deletions scripts/setup_pre_commit_hook.sh

This file was deleted.

15 changes: 0 additions & 15 deletions scripts/swift-format.sh

This file was deleted.