-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd34eac
commit 13ad9a5
Showing
19 changed files
with
409 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1 @@ | ||
# These are supported funding model platforms | ||
|
||
github: [danielsaidi] | ||
patreon: # Replace with a single Patreon username | ||
open_collective: # Replace with a single Open Collective username | ||
ko_fi: # Replace with a single Ko-fi username | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
liberapay: # Replace with a single Liberapay username | ||
issuehunt: # Replace with a single IssueHunt username | ||
otechie: # Replace with a single Otechie username | ||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry | ||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash | ||
|
||
# Documentation: | ||
# This script builds a <TARGET> for all supported platforms. | ||
|
||
# Exit immediately if a command exits with a non-zero status | ||
set -e | ||
|
||
# Verify that all required arguments are provided | ||
if [ $# -eq 0 ]; then | ||
echo "Error: This script requires exactly one argument" | ||
echo "Usage: $0 <TARGET>" | ||
exit 1 | ||
fi | ||
|
||
# Create local argument variables. | ||
TARGET=$1 | ||
|
||
# Use the script folder to refer to other scripts. | ||
FOLDER="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
SCRIPT="$FOLDER/build_platform.sh" | ||
|
||
# Make the script executable | ||
chmod +x $SCRIPT | ||
|
||
# A function that builds a specific platform | ||
build_platform() { | ||
local platform=$1 | ||
echo "Building for $platform..." | ||
if ! bash $SCRIPT $TARGET $platform; then | ||
echo "Failed to build $platform" | ||
return 1 | ||
fi | ||
echo "Successfully built $platform" | ||
} | ||
|
||
# Array of platforms to build | ||
platforms=("iOS" "macOS" "tvOS" "watchOS" "xrOS") | ||
|
||
# Loop through platforms and build | ||
for platform in "${platforms[@]}"; do | ||
if ! build_platform "$platform"; then | ||
exit 1 | ||
fi | ||
done | ||
|
||
echo "All platforms built successfully!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# Documentation: | ||
# This script builds a <TARGET> for a specific <PLATFORM>. | ||
|
||
# Verify that all required arguments are provided | ||
if [ $# -ne 2 ]; then | ||
echo "Error: This script requires exactly two arguments" | ||
echo "Usage: $0 <TARGET> <PLATFORM>" | ||
exit 1 | ||
fi | ||
|
||
TARGET=$1 | ||
PLATFORM=$2 | ||
|
||
xcodebuild -scheme $TARGET -derivedDataPath .build -destination generic/platform=$PLATFORM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
# Documentation: | ||
# This script build DocC for a <TARGET>. | ||
# The documentation ends up in to .build/docs. | ||
|
||
# Verify that all required arguments are provided | ||
if [ $# -eq 0 ]; then | ||
echo "Error: This script requires exactly one argument" | ||
echo "Usage: $0 <TARGET>" | ||
exit 1 | ||
fi | ||
|
||
TARGET=$1 | ||
TARGET_LOWERCASED=$(echo "$1" | tr '[:upper:]' '[:lower:]') | ||
|
||
swift package resolve; | ||
|
||
xcodebuild docbuild -scheme $1 -derivedDataPath /tmp/docbuild -destination 'generic/platform=iOS'; | ||
|
||
$(xcrun --find docc) process-archive \ | ||
transform-for-static-hosting /tmp/docbuild/Build/Products/Debug-iphoneos/$1.doccarchive \ | ||
--output-path .build/docs \ | ||
--hosting-base-path "$TARGET"; | ||
|
||
echo "<script>window.location.href += \"/documentation/$TARGET_LOWERCASED\"</script>" > .build/docs/index.html; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash | ||
|
||
# Documentation: | ||
# This script tests a <TARGET> for all supported platforms. | ||
|
||
# Exit immediately if a command exits with a non-zero status | ||
set -e | ||
|
||
# Verify that all required arguments are provided | ||
if [ $# -eq 0 ]; then | ||
echo "Error: This script requires exactly one argument" | ||
echo "Usage: $0 <TARGET>" | ||
exit 1 | ||
fi | ||
|
||
# Create local argument variables. | ||
TARGET=$1 | ||
|
||
# Use the script folder to refer to other scripts. | ||
FOLDER="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
SCRIPT="$FOLDER/test_platform.sh" | ||
|
||
# Make the script executable | ||
chmod +x $SCRIPT | ||
|
||
# A function that tests a specific platform | ||
test_platform() { | ||
local platform=$1 | ||
echo "Testing for $platform..." | ||
if ! bash $SCRIPT $TARGET $platform; then | ||
echo "Failed to test $platform" | ||
return 1 | ||
fi | ||
echo "Successfully tested $platform" | ||
} | ||
|
||
# Array of platforms to test | ||
platforms=("platform=iOS_Simulator,name=iPhone_16") | ||
|
||
# Loop through platforms and build | ||
for platform in "${platforms[@]}"; do | ||
if ! test_platform "$platform"; then | ||
exit 1 | ||
fi | ||
done | ||
|
||
echo "All platforms tested successfully!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
# Documentation: | ||
# This script tests a <TARGET> for a specific platform. | ||
# Use _ instead of spaces when passing in the <PLATFORM>. | ||
|
||
# Verify that all required arguments are provided | ||
if [ $# -ne 2 ]; then | ||
echo "Error: This script requires exactly two arguments" | ||
echo "Usage: $0 <TARGET> <PLATFORM>" | ||
exit 1 | ||
fi | ||
|
||
TARGET=$1 | ||
PLATFORM="${2//_/ }" | ||
|
||
xcodebuild test -scheme $TARGET -derivedDataPath .build -destination "$PLATFORM" -enableCodeCoverage YES; |
Oops, something went wrong.