Skip to content

Commit e613efe

Browse files
authored
fix: cargo build release flag (#203)
* add changes * removed empty str from arr * attempt to fix cargo build * removed unused file * added suggested simplification * removed ci cargo install
1 parent a7cc35a commit e613efe

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

.changeset/cyan-sloths-move.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"ferric-cli": patch
3+
---
4+
5+
Fixed cargo build release flag

.github/workflows/check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
with:
4343
node-version: lts/jod
4444
- name: Set up JDK 17
45-
uses: actions/setup-java@v3
45+
uses: actions/setup-java@v4
4646
with:
4747
java-version: "17"
4848
distribution: "temurin"
@@ -95,7 +95,7 @@ jobs:
9595
with:
9696
node-version: lts/jod
9797
- name: Set up JDK 17
98-
uses: actions/setup-java@v3
98+
uses: actions/setup-java@v4
9999
with:
100100
java-version: "17"
101101
distribution: "temurin"

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ferric-example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
"bootstrap": "npm run build"
1717
},
1818
"devDependencies": {
19-
"ferric-cli": "^0.2.0"
19+
"ferric-cli": "*"
2020
}
2121
}

packages/ferric/src/cargo.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ type BuildOptions = {
7676

7777
export async function build(options: BuildOptions) {
7878
const { target, configuration } = options;
79-
await spawn("cargo", ["build", "--target", target], {
79+
const args = ["build", "--target", target]
80+
if (configuration.toLowerCase() === 'release') {
81+
args.push('--release')
82+
}
83+
await spawn("cargo", args, {
8084
outputMode: "buffered",
8185
env: {
8286
...process.env,

0 commit comments

Comments
 (0)