Skip to content

Commit 8590b55

Browse files
committed
Fix: specify dist version, to keep CI from failing when a new dist version is released.
1 parent 6c64466 commit 8590b55

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

builder/src/main.rs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// the CodeChat Editor. If not, see
1515
// [http://www.gnu.org/licenses](http://www.gnu.org/licenses).
1616
/// `main.rs` -- Entrypoint for the CodeChat Editor Builder
17-
/// ============================================================================
17+
/// =======================================================
1818
///
1919
/// This code uses [dist](https://opensource.axo.dev/cargo-dist/book/) as a part
2020
/// of the release process. To update the `./release.yaml` file this tool
@@ -25,8 +25,11 @@
2525
/// 3. Review changes to `./release.yaml`, reapplying hand edits.
2626
/// 4. Revert the changes to `server/dist-workspace.toml`.
2727
/// 5. Test
28+
///
29+
/// Keep the `DIST_VERSION` consistent with the version of dist in
30+
/// `dist-workspace.toml` on release.
2831
// Imports
29-
// -----------------------------------------------------------------------------
32+
// -------
3033
//
3134
// ### Standard library
3235
use std::{
@@ -50,7 +53,7 @@ use regex::Regex;
5053
// None
5154
//
5255
// Data structures
53-
// -----------------------------------------------------------------------------
56+
// ---------------
5457
//
5558
// The following defines the command-line interface for the CodeChat Editor.
5659
#[derive(Parser)]
@@ -117,15 +120,16 @@ struct TypeScriptBuildOptions {
117120
}
118121

119122
// Constants
120-
// -----------------------------------------------------------------------------
123+
// ---------
121124
static VSCODE_PATH: &str = "../extensions/VSCode";
122125
static CLIENT_PATH: &str = "../client";
123126
static BUILDER_PATH: &str = "../builder";
124127
static TEST_UTILS_PATH: &str = "../test_utils";
125128
static NAPI_TARGET: &str = "NAPI_TARGET";
129+
static DIST_VERSION: &str = "0.31.0";
126130

127131
// Code
128-
// -----------------------------------------------------------------------------
132+
// ----
129133
//
130134
// ### Utilities
131135
//
@@ -288,7 +292,7 @@ fn search_and_replace_file<
288292
}
289293

290294
// Core routines
291-
// -----------------------------------------------------------------------------
295+
// -------------
292296
//
293297
// These functions simplify common build-focused development tasks and support
294298
// CI builds.
@@ -395,13 +399,13 @@ fn run_install(dev: bool) -> io::Result<()> {
395399
// on MacOS. Try another approach.
396400
#[cfg(target_os = "macos")]
397401
run_cmd!(
398-
curl --proto =https --tlsv1.2 -LsSf "https://github.com/axodotdev/cargo-dist/releases/latest/download/cargo-dist-installer.sh" | sh;
402+
curl --proto =https --tlsv1.2 -LsSf "https://github.com/axodotdev/cargo-dist/releases/download/v${DIST_VERSION}/cargo-dist-installer.sh" | sh;
399403

400404
)?;
401405
#[cfg(not(target_os = "macos"))]
402406
run_cmd!(
403407
info "cargo binstall cargo-dist";
404-
cargo binstall cargo-dist --no-confirm;
408+
cargo binstall cargo-dist@${DIST_VERSION} --no-confirm;
405409
)?;
406410

407411
run_cmd!(
@@ -766,7 +770,7 @@ fn run_postrelease(target: &str) -> io::Result<()> {
766770
}
767771

768772
// CLI implementation
769-
// -----------------------------------------------------------------------------
773+
// ------------------
770774
//
771775
// The following code implements the command-line interface for the CodeChat
772776
// Editor.

0 commit comments

Comments
 (0)