Skip to content

Commit fb7d18d

Browse files
committed
support custom profile
1 parent dad6a27 commit fb7d18d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,13 @@ class RustPlugin {
6868
`${cargoDownloads}:/root/.cargo/git`
6969
];
7070
const customArgs = [];
71+
7172
let cargoFlags = (funcArgs || {}).cargoFlags || this.custom.cargoFlags;
73+
let profile = (funcArgs || {}).profile || this.custom.profile;
74+
if (profile) {
75+
// release or dev
76+
customArgs.push("-e", `PROFILE=${profile}`);
77+
}
7278
if (cargoPackage != undefined) {
7379
if (cargoFlags) {
7480
cargoFlags = `${cargoFlags} -p ${cargoPackage}`;

0 commit comments

Comments
 (0)