Skip to content
Merged

Dev1 #115

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jobs:
server/bt prerelease
# Actually do builds and make zips and whatnot
dist build ${{ needs.plan.outputs.tag-flag }} --print=linkage --output-format=json ${{ matrix.dist_args }} > dist-manifest.json
server/bt postrelease ${{ matrix.dist_args }}
server/bt postrelease ${{ matrix.dist_args }} ${{ needs.plan.outputs.tag-flag }}
echo "dist ran successfully"
- id: cargo-dist
name: Post-build
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Changelog

* No changes yet.

Version 0.1.54-beta1 -- 2026-May-11
Version 0.1.55-beta1 -- 2026-May-12
-----------------------------------

* Correct Markdown conversion of the last doc block -- properly append all
Expand Down
72 changes: 72 additions & 0 deletions builder/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ version = "0.1.0"
edition = "2024"

[dependencies]
axotag = "0.3.0"
clap = { version = "4", features = ["derive"] }
cmd_lib = "2.0.0"
current_platform = "0.2.0"
Expand Down
51 changes: 32 additions & 19 deletions builder/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ use std::{
};

// ### Third-party
use axotag::parse_tag;
use clap::{Parser, Subcommand};
use cmd_lib::run_cmd;
use current_platform::CURRENT_PLATFORM;
Expand Down Expand Up @@ -106,6 +107,9 @@ enum Commands {
/// avoid an error.
#[arg(short, long)]
artifacts: Option<String>,
/// The tag which started this build.
#[arg(long)]
tag: String,
},
}

Expand Down Expand Up @@ -724,12 +728,12 @@ fn run_change_version(new_version: &String) -> io::Result<()> {
)?;
search_and_replace_file(
format!("{VSCODE_PATH}/package.json"),
r#"(\r?\n "version": ")[\d.]+(",\r?\n)"#,
r#"(\r?\n "version": ")[\d.]+(?:-[a-z\d]*)(",\r?\n)"#,
&replacement_string,
)?;
search_and_replace_file(
format!("{CLIENT_PATH}/package.json5"),
r#"(\r?\n version: ')[\d.]+(',\r?\n)"#,
r#"(\r?\n version: ')[\d.]+(?:-[a-z\d]*)(',\r?\n)"#,
&replacement_string,
)?;
Ok(())
Expand All @@ -742,7 +746,7 @@ fn run_prerelease() -> io::Result<()> {
run_client_build(true, false)
}

fn run_postrelease(target: &str) -> io::Result<()> {
fn run_postrelease(target: &str, tag: &str) -> io::Result<()> {
// Copy all the Client static files needed by the embedded Server to the
// VSCode extension.
let client_static_dir = format!("{VSCODE_PATH}/static");
Expand All @@ -762,27 +766,36 @@ fn run_postrelease(target: &str) -> io::Result<()> {
"aarch64-apple-darwin" => "darwin-arm64",
_ => panic!("Unsupported platform {target}."),
};

// Determine if this is a pre-release from the version tag. While `dist`
// does this, it doesn't provide this data in CI until the `host` step,
// which comes after this is called. Determine it based on the tag.
let is_prerelease = if let Ok(parsed_tag) = parse_tag(&[], tag) {
parsed_tag.prerelease
} else {
false
};
let mut args = vec![
"vsce",
"package",
// We use esbuild to package; therefore, tell `vsce` not to package.
"--no-dependencies",
// Since we include the server as a binary, package for the architecture
// the binary was build for.
"--target",
vsce_target,
];
if is_prerelease {
args.push("--pre-release");
}

// `vsce` will invoke this program's `ext_build`; however, it doesn't
// provide a way to pass the target when cross-compiling. Use an environment
// variable instead.
unsafe {
env::set_var(NAPI_TARGET, target);
}
run_script(
"npx",
&[
"vsce",
"package",
// We use esbuild to package; therefore, tell `vsce` not to package.
"--no-dependencies",
// Since we include the server as a binary, package for the
// architecture the binary was build for.
"--target",
vsce_target,
],
VSCODE_PATH,
true,
)?;
run_script("npx", &args, VSCODE_PATH, true)?;

Ok(())
}
Expand All @@ -808,7 +821,7 @@ impl Cli {
}
Commands::ChangeVersion { new_version } => run_change_version(new_version),
Commands::Prerelease => run_prerelease(),
Commands::Postrelease { target, .. } => run_postrelease(target),
Commands::Postrelease { target, tag, .. } => run_postrelease(target, tag),
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions client/package.json5
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
url: 'https://github.com/bjones1/CodeChat_editor',
},
type: 'module',
version: '0.1.54-beta1',
version: '0.1.55-beta1',
dependencies: {
'@codemirror/commands': '^6.10.3',
'@codemirror/lang-cpp': '^6.0.3',
Expand Down Expand Up @@ -79,10 +79,10 @@
'@types/dom-navigation': '^1.0.7',
'@types/js-beautify': '^1.14.3',
'@types/mocha': '^10.0.10',
'@types/node': '^24.12.3',
'@types/node': '^24.12.4',
'@types/toastify-js': '^1.12.4',
'@typescript-eslint/eslint-plugin': '^8.59.2',
'@typescript-eslint/parser': '^8.59.2',
'@typescript-eslint/eslint-plugin': '^8.59.3',
'@typescript-eslint/parser': '^8.59.3',
chai: '^6.2.2',
esbuild: '^0.28.0',
eslint: '^10.3.0',
Expand All @@ -91,10 +91,10 @@
'eslint-plugin-prettier': '^5.5.5',
globals: '^17.6.0',
mocha: '^11.7.5',
'npm-check-updates': '^22.1.1',
'npm-check-updates': '^22.2.0',
prettier: '^3.8.3',
typescript: '^6.0.3',
'typescript-eslint': '^8.59.2',
'typescript-eslint': '^8.59.3',
},
scripts: {
test: 'echo "Error: no test specified" && exit 1',
Expand Down
Loading
Loading