Skip to content

Commit 018949d

Browse files
committed
Replace Fastlane with Shell scripts
1 parent c88454a commit 018949d

20 files changed

+411
-115
lines changed

.github/FUNDING.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1 @@
1-
# These are supported funding model platforms
2-
31
github: [danielsaidi]
4-
patreon: # Replace with a single Patreon username
5-
open_collective: # Replace with a single Open Collective username
6-
ko_fi: # Replace with a single Ko-fi username
7-
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8-
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9-
liberapay: # Replace with a single Liberapay username
10-
issuehunt: # Replace with a single IssueHunt username
11-
otechie: # Replace with a single Otechie username
12-
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13-
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/workflows/build.yml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,16 @@ on:
88
branches: ["main"]
99
pull_request:
1010
branches: ["main"]
11-
12-
env:
13-
SCHEME: PrintingKit
1411

1512
jobs:
1613
build:
17-
runs-on: macos-13
14+
runs-on: macos-15
1815
steps:
1916
- uses: actions/checkout@v3
2017
- uses: maxim-lobanov/setup-xcode@v1
2118
with:
22-
xcode-version: '15.1.0'
23-
- name: Build iOS
24-
run: xcodebuild -scheme $SCHEME -derivedDataPath .build -destination 'generic/platform=iOS';
25-
- name: Build macOS
26-
run: xcodebuild -scheme $SCHEME -derivedDataPath .build -destination 'generic/platform=OS X';
27-
- name: Build tvOS
28-
run: xcodebuild -scheme $SCHEME -derivedDataPath .build -destination 'generic/platform=tvOS';
29-
- name: Build watchOS
30-
run: xcodebuild -scheme $SCHEME -derivedDataPath .build -destination 'generic/platform=watchOS';
31-
- name: Build visionOS
32-
run: xcodebuild -scheme $SCHEME -derivedDataPath .build -destination 'generic/platform=xrOS';
19+
xcode-version: '16.0'
20+
- name: Build all platforms
21+
run: bash scripts/build.sh ${{ github.event.repository.name }}
3322
- name: Test iOS
34-
run: xcodebuild test -scheme $SCHEME -derivedDataPath .build -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.2' -enableCodeCoverage YES;
23+
run: bash scripts/test.sh ${{ github.event.repository.name }}

.github/workflows/docc.yml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,34 +24,23 @@ jobs:
2424
environment:
2525
name: github-pages
2626
url: ${{ steps.deployment.outputs.page_url }}
27-
runs-on: macos-13
27+
runs-on: macos-15
2828
steps:
2929
- name: Checkout
3030
uses: actions/checkout@v3
3131
- id: pages
3232
name: Setup Pages
3333
uses: actions/configure-pages@v4
34-
- name: Select Xcode 15.1
34+
- name: Select Xcode version
3535
uses: maxim-lobanov/setup-xcode@v1
3636
with:
37-
xcode-version: '15.1.0'
37+
xcode-version: '16.0'
3838
- name: Build DocC
39-
run: |
40-
swift package resolve;
41-
42-
xcodebuild docbuild -scheme PrintingKit -derivedDataPath /tmp/docbuild -destination 'generic/platform=iOS';
43-
44-
$(xcrun --find docc) process-archive \
45-
transform-for-static-hosting /tmp/docbuild/Build/Products/Debug-iphoneos/PrintingKit.doccarchive \
46-
--output-path docs \
47-
--hosting-base-path 'PrintingKit';
48-
49-
echo "<script>window.location.href += \"/documentation/printingkit\"</script>" > docs/index.html;
50-
39+
run: bash scripts/docc.sh ${{ github.event.repository.name }}
5140
- name: Upload artifact
5241
uses: actions/upload-pages-artifact@v3
5342
with:
54-
path: 'docs'
43+
path: '.build/docs'
5544
- id: deployment
5645
name: Deploy to GitHub Pages
5746
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
# SPM defaults
21
.DS_Store
32
/.build
4-
.swiftpm/
53
/Packages
6-
7-
# Fastlane
8-
Fastlane/report.xml
9-
Fastlane/Preview.html
10-
Fastlane/test_output
11-
Fastlane/README.md
12-
13-
**/*.xcuserstate
4+
.swiftpm/
5+
xcuserdata/
6+
DerivedData/

Fastlane/Fastfile

Lines changed: 0 additions & 54 deletions
This file was deleted.

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<p align="center">
2-
<img src ="Resources/Logo_GitHub.png" alt="PrintingKit Logo" title="PrintingKit" />
2+
<img src ="Resources/Logo_Rounded.png" alt="PrintingKit Logo" title="PrintingKit" />
33
</p>
44

55
<p align="center">
@@ -65,19 +65,19 @@ struct MyView: View {
6565
}
6666
```
6767

68-
For more information, please see the [getting started guide][Getting-Started].
68+
See the online [getting started guide][Getting-Started] for more information.
6969

7070

7171

7272
## Documentation
7373

74-
The [online documentation][Documentation] has more information, articles, code examples, etc.
74+
The online [documentation][Documentation] has more information, articles, code examples, etc.
7575

7676

7777

7878
## Demo Application
7979

80-
The demo app lets you explore the library. To try it out, just open and run the `Demo` project.
80+
The `Demo` folder has an app that lets you explore the library.
8181

8282

8383

@@ -117,4 +117,5 @@ PrintingKit is available under the MIT license. See the [LICENSE][License] file
117117

118118
[Documentation]: https://danielsaidi.github.io/PrintingKit
119119
[Getting-Started]: https://danielsaidi.github.io/PrintingKit/documentation/printingkit/getting-started
120+
120121
[License]: https://github.com/danielsaidi/PrintingKit/blob/master/LICENSE

RELEASE_NOTES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ Until then, deprecated features may be removed in the next minor version.
66

77

88

9+
## 0.6
10+
11+
This version makes PrintingKit use Swift 6.
12+
13+
14+
915
## 0.5.2
1016

1117
This version removes actor information from the PdfDataSource protocol.
File renamed without changes.

Version

Lines changed: 0 additions & 3 deletions
This file was deleted.

scripts/build.sh

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/bin/bash
2+
3+
# Documentation:
4+
# This script builds a <TARGET> for all supported platforms.
5+
6+
# Exit immediately if a command exits with a non-zero status
7+
set -e
8+
9+
# Verify that all required arguments are provided
10+
if [ $# -eq 0 ]; then
11+
echo "Error: This script requires exactly one argument"
12+
echo "Usage: $0 <TARGET>"
13+
exit 1
14+
fi
15+
16+
# Create local argument variables.
17+
TARGET=$1
18+
19+
# Use the script folder to refer to other scripts.
20+
FOLDER="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
21+
SCRIPT="$FOLDER/build_platform.sh"
22+
23+
# Make the script executable
24+
chmod +x $SCRIPT
25+
26+
# A function that builds a specific platform
27+
build_platform() {
28+
local platform=$1
29+
echo "Building for $platform..."
30+
if ! bash $SCRIPT $TARGET $platform; then
31+
echo "Failed to build $platform"
32+
return 1
33+
fi
34+
echo "Successfully built $platform"
35+
}
36+
37+
# Array of platforms to build
38+
platforms=("iOS" "macOS" "tvOS" "watchOS" "xrOS")
39+
40+
# Loop through platforms and build
41+
for platform in "${platforms[@]}"; do
42+
if ! build_platform "$platform"; then
43+
exit 1
44+
fi
45+
done
46+
47+
echo "All platforms built successfully!"

0 commit comments

Comments
 (0)