xcodeproj-sort 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +27 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5bf77888487c0eb7e0ea67e43fa7627642a766c4a706aea13303c87d500145d4
|
4
|
+
data.tar.gz: 5e8c14507d9ddb8f347fccc6d9c5b68ede529601c1c35872887b928ca5d20330
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 379183f66837f07eac1a97e2c79002171f985e37bd61a224dc9750106ca8dfd589a0e22aaeb61bfffa68715855290414c95c9182789cdbbfc786ee1bb96bac7e
|
7
|
+
data.tar.gz: 840de7e1c7285f832fc2771b21d7e9808e00b3f9dce978b79824e4319950fad4146d0f4be0a5d235e42a6b8aebb4c085a799457a57e76480a938d3237dca7051
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# xcodeproj-sort-pre-commit-hook
|
2
2
|
A pre-commit hook that sorts your xcodeproj file.
|
3
3
|
|
4
|
+
<img src="https://i.imgur.com/knSvFpV.png" height="700">
|
5
|
+
|
4
6
|
## What is it?
|
5
7
|
This repo provides a ready to use [pre-commit](https://pre-commit.com/) hook for automatically sorting your Xcode project. The hook looks for files ending in .pbxproj that have been modified and sorts their project group hierarchy automatically using the [Xcodeproj](https://github.com/CocoaPods/Xcodeproj/) gem. The effect is that the sort leaves your project file modified if it's not sorted, so that pre-commit won't allow the unsorted file to go through.
|
6
8
|
|
@@ -11,9 +13,10 @@ Add the following to your `.pre-commit-config.yaml`:
|
|
11
13
|
|
12
14
|
```
|
13
15
|
- repo: git://github.com/noahsark769/xcodeproj-sort-pre-commit-hook
|
14
|
-
sha: v1.0.
|
16
|
+
sha: v1.0.2
|
15
17
|
hooks:
|
16
18
|
- id: xcodeproj-sort
|
19
|
+
args: [--groups-position=above]
|
17
20
|
```
|
18
21
|
|
19
22
|
Then, run:
|
@@ -22,5 +25,28 @@ Then, run:
|
|
22
25
|
pre-commit install
|
23
26
|
```
|
24
27
|
|
28
|
+
### Options
|
29
|
+
Use the `--groups-position` option to specify the position of groups in the sort:
|
30
|
+
- `above`: Positions groups above objects in the sort
|
31
|
+
- `below`: Positions groups below objects in the sort
|
32
|
+
|
33
|
+
The default is to interleave groups and objects in the sort.
|
34
|
+
|
35
|
+
### Running manually
|
36
|
+
The code runs in a rubygem which is build by `pre-commit`. To run a sort manually outside of `pre-commit`, install the gem locally:
|
37
|
+
|
38
|
+
```
|
39
|
+
gem install xcodeproj-sort
|
40
|
+
```
|
41
|
+
|
42
|
+
Then, run the gem with the project file as an argument:
|
43
|
+
|
44
|
+
```
|
45
|
+
xcodeproj-sort MyProject.xcodeproj/project.pbxproj
|
46
|
+
```
|
47
|
+
|
25
48
|
## Contributing
|
26
49
|
I use this in the development of [Trestle](https://appstore.com/trestle), but your mileage might vary. If you notice a bug or have a feature request, please open a github issue or submit a pull request. It's best to open issues first so that work isn't duplicated.
|
50
|
+
|
51
|
+
## Development
|
52
|
+
After closing the repo, you can run `make install` to build the gem and install locally, after which `xcodeproj-sort` should be in your path.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcodeproj-sort
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Noah Gilmore
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xcodeproj
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.5.9
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.5.9
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: claide
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -71,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
71
|
version: '0'
|
72
72
|
requirements: []
|
73
73
|
rubyforge_project:
|
74
|
-
rubygems_version: 2.
|
74
|
+
rubygems_version: 2.7.7
|
75
75
|
signing_key:
|
76
76
|
specification_version: 4
|
77
77
|
summary: Sort your xcodeproj file in a pre-commit hook.
|