Skip to content

Commit

Permalink
fix: support multi arch
Browse files Browse the repository at this point in the history
  • Loading branch information
zhu-xiaowei committed Nov 15, 2024
1 parent 988a65f commit c811849
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,18 +149,18 @@ Firstly, clone this repo and run `npm i` to download the dependencies.
### Build for Android

```bash
npm run start && npm run android
npm start && npm run android
```

### Build for iOS

```bash
npm run start && npm run ios
npm start && npm run ios
```

### Build for macOS

1. Modify as `isMac = true` in `/src/App.tsx` and execute `npm run start`.
1. Modify as `isMac = true` in `/src/App.tsx` and execute `npm start`.
2. Double click `ios/SwiftChat.xcworkspace` to open the project in your Xcode.
3. Change the build destination to `My Mac (Mac Catalyst)` then click the ▶ Run button.

Expand Down
6 changes: 3 additions & 3 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,18 @@ Android、iOS 和 macOS 等多个平台。
### 构建 Android

```bash
npm run start && npm run android
npm start && npm run android
```

## 构建 iOS

```bash
npm run start && npm run ios
npm start && npm run ios
```

### 构建 macOS

1.`/src/App.tsx` 中将 `isMac` 修改为 `true` 并执行 `npm run start`
1.`/src/App.tsx` 中将 `isMac` 修改为 `true` 并执行 `npm start`
2. 双击 `ios/SwiftChat.xcworkspace` 在 Xcode 中打开项目。
3. 将构建目标更改为 `My Mac (Mac Catalyst)` 然后点击 ▶ 运行按钮。

Expand Down
7 changes: 4 additions & 3 deletions server/scripts/push-to-ecr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ set -o pipefail # exit on any error in a pipeline

# Define variables
TAG="latest"
ARCHS=("amd64")
ARCHS=("amd64" "arm64")
AWS_REGIONS=("us-east-1") # List of AWS region, use below list if you don't enable ECR repository replication
# AWS_REGIONS=("us-east-1" "us-west-2" "ap-southeast-1" "ap-southeast-2" "ap-northeast-1" "eu-central-1" "eu-west-3") # List of supported AWS regions
# AWS_REGIONS=("us-west-2" "us-east-1" "ap-south-1" "ap-southeast-1" "ap-southeast-2" "ap-northeast-1" "ca-central-1"
# "eu-central-1" "eu-west-2" "eu-west-3" "sa-east-1") # List of supported AWS regions

build_and_push_images() {
local IMAGE_NAME=$1
Expand Down Expand Up @@ -73,4 +74,4 @@ build_and_push_images() {
done
}

build_and_push_images "swift-chat-api" "$TAG" "false" "../src/Dockerfile"
build_and_push_images "swift-chat-api" "$TAG" "true" "../src/Dockerfile"
2 changes: 1 addition & 1 deletion server/template/SwiftChatLambda.template
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"Type": "AWS::Lambda::Function",
"Properties": {
"Architectures": [
"x86_64"
"arm64"
],
"Code": {
"ImageUri": {
Expand Down

0 comments on commit c811849

Please sign in to comment.