Skip to content

Commit

Permalink
chore: Do not generate SPM until archive
Browse files Browse the repository at this point in the history
  • Loading branch information
rynecheow committed Jan 5, 2021
1 parent 2066a25 commit 2c5b116
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 693 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ Package.resolved

.DS_Store
**/.idea/**
RxWebKit-SPM.xcodeproj
490 changes: 0 additions & 490 deletions RxWebKit-SPM.xcodeproj/project.pbxproj

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ exit 1
fi

if which xcodegen >/dev/null; then
`which xcodegen` --spec project-spm.yml
`which xcodegen` --spec project-carthage.yml
else
echo "error: XcodeGen not installed, do `sh setup.sh` to install XcodeGen."
Expand Down
4 changes: 3 additions & 1 deletion scripts/bump-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ echo "RELEASE_VERSION=$(git describe --abbrev=0 | tr -d '\n')" >> $GITHUB_ENV
export VERSION="$(git describe --abbrev=0 | tr -d '\n')"
VERSION=${VERSION:1}
echo $VERSION
npx podspec-bump -w -i "$VERSION"
npx podspec-bump -w -i "$VERSION"
git add -A
git commit --amend --no-edit
15 changes: 9 additions & 6 deletions scripts/xcframeworks.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/usr/bin/env bash

set -euo pipefail
rm -rf RxWebKit-SPM.xcodeproj
rm -rf xcarchives/*
rm -rf RxWebKit.xcframework.zip
rm -rf RxWebKit.xcframework

xcodegen --spec project-spm.yml

xcodebuild archive -quiet -project RxWebKit-SPM.xcodeproj -scheme "RxWebKit iOS" -sdk iphoneos -archivePath "xcarchives/RxWebKit-iOS"
xcodebuild archive -quiet -project RxWebKit-SPM.xcodeproj -scheme "RxWebKit iOS" -sdk iphonesimulator -archivePath "xcarchives/RxWebKit-iOS-Simulator"
xcodebuild archive -quiet -project RxWebKit-SPM.xcodeproj -scheme "RxWebKit macOS" -sdk macosx -archivePath "xcarchives/RxWebKit-macOS"
xcodebuild archive -quiet -project RxWebKit-SPM.xcodeproj -configuration Release -scheme "RxWebKit iOS" -destination "generic/platform=iOS" -archivePath "xcarchives/RxWebKit-iOS" SKIP_INSTALL=NO SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES OTHER_CFLAGS="-fembed-bitcode" BITCODE_GENERATION_MODE="bitcode" ENABLE_BITCODE=YES | xcpretty --color --simple
xcodebuild archive -quiet -project RxWebKit-SPM.xcodeproj -configuration Release -scheme "RxWebKit iOS" -destination "generic/platform=iOS Simulator" -archivePath "xcarchives/RxWebKit-iOS-Simulator" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES OTHER_CFLAGS="-fembed-bitcode" BITCODE_GENERATION_MODE="bitcode" ENABLE_BITCODE=YES | xcpretty --color --simple
xcodebuild archive -quiet -project RxWebKit-SPM.xcodeproj -configuration Release -scheme "RxWebKit macOS" -destination "generic/platform=macOS" -archivePath "xcarchives/RxWebKit-macOS" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES OTHER_CFLAGS="-fembed-bitcode" BITCODE_GENERATION_MODE="bitcode" ENABLE_BITCODE=YES | xcpretty --color --simple

xcodebuild -create-xcframework \
-framework "xcarchives/RxWebKit-iOS-Simulator.xcarchive/Products/Library/Frameworks/RxWebKit.framework" \
Expand All @@ -19,4 +21,5 @@ xcodebuild -create-xcframework \

zip -r RxWebKit.xcframework.zip RxWebKit.xcframework
rm -rf xcarchives/*
rm -rf RxWebKit.xcframework
rm -rf RxWebKit.xcframework
rm -rf RxWebKit-SPM.xcodeproj

0 comments on commit 2c5b116

Please sign in to comment.