-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathbuild.ps1
More file actions
32 lines (26 loc) · 853 Bytes
/
build.ps1
File metadata and controls
32 lines (26 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# Exit on error
$ErrorActionPreference = "Stop"
# Fetch the vsts-rest-api-specs submodule
Write-Host "Fetch vsts-rest-api-specs"
git submodule init
git submodule update
# Patch the API
Write-Host "Create vsts-rest-api-specs.patched"
Remove-Item -Recurse -Force vsts-rest-api-specs.patched -ErrorAction Ignore
Set-Location vsts-api-patcher
cargo run --release
Set-Location ..
# Autogen the Rust crate
Write-Host "Autogen Rust crate"
Remove-Item -Recurse -Force azure_devops_rust_api/target -ErrorAction Ignore
Set-Location autorust
cargo run --bin ado-autorust --release
Set-Location ..
# Build Rust crate
Set-Location azure_devops_rust_api
Write-Host "Build azure_devops_rust_api"
cargo build --all-features
Set-Location ..
Write-Host "Done"