Skip to content

Commit 7c2afb0

Browse files
committed
Add option to skip ls and stwo in create archive xtask
1 parent c84ee3d commit 7c2afb0

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/_build-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ jobs:
114114
run: ${{ env.CARGO }} build --release --locked --target ${{ matrix.target }} -p scarb-prove -p scarb-verify
115115

116116
- name: Create archive
117-
run: cargo xtask create-archive
117+
run: cargo xtask create-archive ${{ !inputs.include-cairols && '--skip-cairols' || '' }} ${{ !inputs.include-stwo && '--skip-stwo' || '' }}
118118
env:
119119
STAGING: scarb-${{ inputs.scarb-tag }}-${{ matrix.target }}
120120
TARGET: ${{ matrix.target }}

xtask/src/create_archive.rs

+11-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::path::PathBuf;
22

33
use anyhow::Result;
44
use clap::Parser;
5-
use xshell::{cmd, Shell};
5+
use xshell::{Shell, cmd};
66

77
use crate::list_binaries::list_binaries;
88

@@ -12,6 +12,10 @@ pub struct Args {
1212
target: Option<String>,
1313
#[arg(short, long, env = "STAGING")]
1414
staging: PathBuf,
15+
#[arg(long)]
16+
skip_cairols: bool,
17+
#[arg(long)]
18+
skip_stwo: bool,
1519
}
1620

1721
pub fn main(args: Args) -> Result<()> {
@@ -38,6 +42,12 @@ pub fn main(args: Args) -> Result<()> {
3842
}
3943

4044
for bin in list_binaries()? {
45+
if args.skip_cairols && bin == "scarb-cairo-language-server" {
46+
continue;
47+
}
48+
if args.skip_stwo && (bin == "scarb-prove" || bin == "scarb-verify") {
49+
continue;
50+
}
4151
let file_name = format!("{bin}{bin_ext}");
4252
sh.copy_file(
4353
target_dir.join("release").join(&file_name),

0 commit comments

Comments
 (0)