Skip to content

Commit d1ca3a6

Browse files
Improve Quick Start project shell scripts (#588)
1 parent 2103b57 commit d1ca3a6

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

Configuration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Specify a path to a custom config file by providing the `--config` option when e
99
If utilizing the [quick start project setup](https://github.com/TinderApp/Nodes#quick-start), the path can be set in the `project.yml` file, for example:
1010

1111
```
12-
swift run -- nodes-xcode-templates-gen --id "Custom" --config "nodes.yml"
12+
swift run --skip-build -- nodes-xcode-templates-gen --id "Custom" --config "nodes.yml"
1313
```
1414

1515
> TIP: The provided `id` value is used to uniquely identify different sets of templates within the new file dialog in Xcode.

RxSwift.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Specify a path to a custom config file by providing the `--config` option when e
99
If utilizing the [quick start project setup](https://github.com/TinderApp/Nodes#quick-start), the path can be set in the `project.yml` file, for example:
1010

1111
```
12-
swift run -- nodes-xcode-templates-gen --id "RxSwift" --config "nodes.yml"
12+
swift run --skip-build -- nodes-xcode-templates-gen --id "RxSwift" --config "nodes.yml"
1313
```
1414

1515
> TIP: The provided `id` value is used to uniquely identify different sets of templates within the new file dialog in Xcode.

genesis.yml

+13-6
Original file line numberDiff line numberDiff line change
@@ -2407,7 +2407,7 @@ files:
24072407
then
24082408
WORKSPACE_DOCUMENT_NAME="{{ project|replace:' ','_' }}.xcodeproj"
24092409
osascript \
2410-
-e 'set workspaceDocumentName to "'"${WORKSPACE_DOCUMENT_NAME}"'"' \
2410+
-e 'set workspaceDocumentName to "'"$WORKSPACE_DOCUMENT_NAME"'"' \
24112411
-e 'if app id "com.apple.dt.Xcode" is running then' \
24122412
-e 'tell app id "com.apple.dt.Xcode"' \
24132413
-e 'if workspace document workspaceDocumentName exists then' \
@@ -2427,20 +2427,27 @@ files:
24272427
-e 'end tell' \
24282428
-e 'end if'
24292429
else
2430-
echo "AppleScript is not executed in CI."
2430+
echo "AppleScript to close the Xcode project is not executed in CI."
24312431
fi
24322432
NEEDLE_GENERATED="{{ project|replace:' ','_' }}/Generated/NeedleGenerated.swift"
24332433
MOCKOLO_GENERATED="{{ project|replace:' ','_' }}Tests/Generated/MockoloGenerated.swift"
2434-
[[ -f "${NEEDLE_GENERATED}" ]] || touch "${NEEDLE_GENERATED}"
2435-
[[ -f "${MOCKOLO_GENERATED}" ]] || touch "${MOCKOLO_GENERATED}"
2434+
[[ -f "$NEEDLE_GENERATED" ]] || touch "$NEEDLE_GENERATED"
2435+
[[ -f "$MOCKOLO_GENERATED" ]] || touch "$MOCKOLO_GENERATED"
24362436
postGenCommand: |
24372437
set -e
24382438
if test -z "$CI"
24392439
then
2440-
swift run -- nodes-xcode-templates-gen --id "Xcode Templates"
2440+
echo "⚙️ Installing Xcode templates..."
2441+
swift build --product nodes-xcode-templates-gen >/dev/null
2442+
swift run --skip-build -- nodes-xcode-templates-gen --id "Xcode Templates"
2443+
else
2444+
echo "Xcode templates are not installed in CI."
2445+
fi
2446+
if test -z "$CI"
2447+
then
2448+
echo "⚙️ Opening project..."
24412449
xed {{ project|replace:' ','_' }}.xcodeproj
24422450
else
2443-
echo "Nodes Xcode templates are not installed in CI."
24442451
echo "Xcode project is not opened in CI."
24452452
fi
24462453
packages:

0 commit comments

Comments
 (0)