Skip to content

Commit

Permalink
Rename wallet-sdk to mobile-sdk (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbihel authored Aug 1, 2024
1 parent ca91880 commit 64c7fbe
Show file tree
Hide file tree
Showing 21 changed files with 462 additions and 399 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@ jobs:
tool: cargo-swift

- name: Generate Swift package
run: cargo swift package -p ios -n WalletSdkRs
run: cargo swift package -p ios -n MobileSdkRs
- name: Fail if generated swift code needs update
run: git diff --exit-code WalletSdkRs/Sources/WalletSdkRs/wallet_sdk_rs.swift
run: git diff --exit-code MobileSdkRs/Sources/MobileSdkRs/mobile_sdk_rs.swift
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,25 @@ jobs:
tool: cargo-swift

- name: Generate Swift package
run: cargo swift package -p ios -n WalletSdkRs --release
run: cargo swift package -p ios -n MobileSdkRs --release

- name: Compress XCFramework
run: |
zip -9 -r RustFramework.xcframework.zip WalletSdkRs/RustFramework.xcframework
zip -9 -r RustFramework.xcframework.zip MobileSdkRs/RustFramework.xcframework
echo "XCF_CHECKSUM=`swift package compute-checksum RustFramework.xcframework.zip`" >> $GITHUB_ENV
- name: Update Swift Package definition
run: |
sed -i '' 's/.binaryTarget.*/.binaryTarget(name: "RustFramework", url: "https:\/\/github.com\/spruceid\/wallet-sdk-rs\/releases\/download\/${{ github.event.inputs.version }}\/RustFramework.xcframework.zip", checksum: "${{ env.XCF_CHECKSUM }}"),/' Package.swift
sed -i '' 's/.binaryTarget.*/.binaryTarget(name: "RustFramework", url: "https:\/\/github.com\/spruceid\/mobile-sdk-rs\/releases\/download\/${{ github.event.inputs.version }}\/RustFramework.xcframework.zip", checksum: "${{ env.XCF_CHECKSUM }}"),/' Package.swift
- name: Update Cocoapods definitions
run: |
sed -i '' -r 's/[0-9]+.[0-9]+.[0-9]+/${{ github.event.inputs.version }}/' SpruceIDWalletSdkRsRustFramework.podspec
sed -i '' -r 's/[0-9]+.[0-9]+.[0-9]+/${{ github.event.inputs.version }}/' SpruceIDWalletSdkRs.podspec
sed -i '' -r 's/[0-9]+.[0-9]+.[0-9]+/${{ github.event.inputs.version }}/' SpruceIDMobileSdkRsRustFramework.podspec
sed -i '' -r 's/[0-9]+.[0-9]+.[0-9]+/${{ github.event.inputs.version }}/' SpruceIDMobileSdkRs.podspec
- name: Push changes and tag
run: |
git config user.name github-actions
git config user.email [email protected]
git add Package.swift SpruceIDWalletSdkRs.podspec SpruceIDWalletSdkRsRustFramework.podspec
git add Package.swift SpruceIDMobileSdkRs.podspec SpruceIDMobileSdkRsRustFramework.podspec
git commit -m "Release ${{ github.event.inputs.version }}"
git push
git tag ${{ github.event.inputs.version }} -m "${{ github.event.inputs.version }}"
Expand All @@ -70,8 +70,8 @@ jobs:
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
run: |
pod trunk push SpruceIDWalletSdkRsRustFramework.podspec
pod trunk push SpruceIDWalletSdkRs.podspec --synchronous
pod trunk push SpruceIDMobileSdkRsRustFramework.podspec
pod trunk push SpruceIDMobileSdkRs.podspec --synchronous
kotlin:
runs-on: ubuntu-latest
Expand Down
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/target
/generated
.build
WalletSdkRs/Package.swift
WalletSdkRs/RustFramework*
MobileSdkRs/Package.swift
MobileSdkRs/RustFramework*
.swiftpm
jna-*.jar
*~
*~
kotlin/mobilesdkrs/src/main/java/com/spruceid/mobile/sdk/rs/mobile_sdk_rs.kt
Loading

0 comments on commit 64c7fbe

Please sign in to comment.