Skip to content

Commit

Permalink
Update build_cli_release.ps1 to include openssl
Browse files Browse the repository at this point in the history
  • Loading branch information
Jin committed Aug 3, 2023
1 parent fd7e937 commit 3e8ffc4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/cli/build_cli_release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@
$NAME="aptos-cli"
$CRATE_NAME="aptos"
$CARGO_PATH="crates\$CRATE_NAME\Cargo.toml"
$VCPKG_ROOT="C:\vcpkg"

# Get the version of the CLI from its Cargo.toml.
$VERSION = Get-Content $CARGO_PATH | Select-String -Pattern '^\w*version = "(\d*\.\d*.\d*)"' | % {"$($_.matches.groups[1])"}

# Note: This is required to bypass openssl isssue on Windows.
echo "Setting up vcpkg"
echo "VCPKG_ROOT=$VCPKG_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
vcpkg install openssl:x64-windows-static-md --clean-after-build

# Build the CLI.
echo "Building release $VERSION of $NAME for Windows"
cargo build -p $CRATE_NAME --profile cli
Expand Down

0 comments on commit 3e8ffc4

Please sign in to comment.