Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/cyan-sloths-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ferric-cli": patch
---

Fixed cargo build release flag
5 changes: 3 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
with:
node-version: lts/jod
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
Expand All @@ -51,6 +51,7 @@ jobs:
with:
packages: tools platform-tools ndk;${{ env.NDK_VERSION }}
- run: rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi i686-linux-android aarch64-apple-ios-sim
- run: cargo install cargo-ndk
- run: npm ci
- run: npm run bootstrap
- run: npm test
Expand Down Expand Up @@ -95,7 +96,7 @@ jobs:
with:
node-version: lts/jod
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/ferric-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"bootstrap": "npm run build"
},
"devDependencies": {
"ferric-cli": "^0.2.0"
"ferric-cli": "*"
}
}
6 changes: 4 additions & 2 deletions packages/ferric/src/cargo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ type BuildOptions = {

export async function build(options: BuildOptions) {
const { target, configuration } = options;
await spawn("cargo", ["build", "--target", target], {
const modeConfig = configuration.toLowerCase() === "release" ? "--release" : "";
const cargoBuildArgs = ["build", "--target", target, modeConfig].filter(item => String(item).length > 0)
await spawn("cargo", cargoBuildArgs, {
outputMode: "buffered",
env: {
...process.env,
Expand All @@ -87,7 +89,7 @@ export async function build(options: BuildOptions) {
process.cwd(),
"target",
target,
configuration
modeConfig
);
const dynamicLibraryFile = fs
.readdirSync(targetOutputPath)
Expand Down
Loading