Skip to content

Commit

Permalink
Prepare Argon for release on crates.io, minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DervexDev committed May 1, 2024
1 parent 589c877 commit df69a0e
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
targets: ${{ matrix.target }}

- name: Build
run: cargo build --all-features --release --verbose --target ${{ matrix.target }}
run: cargo build --release --verbose --target ${{ matrix.target }}
env:
AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }}

Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),

- Brand new Argon CLI, written in Rust

[Unreleased]: https://github.com/argon-rbx/argon/compare/2.0.0-pre5...HEAD
[unreleased]: https://github.com/argon-rbx/argon/compare/2.0.0...HEAD
[2.0.0-pre5]: https://github.com/argon-rbx/argon/compare/2.0.0-pre4...2.0.0-pre5
[2.0.0-pre4]: https://github.com/argon-rbx/argon/compare/2.0.0-pre3...2.0.0-pre4
[2.0.0-pre3]: https://github.com/argon-rbx/argon/compare/2.0.0-pre2...2.0.0-pre3
[2.0.0-pre2]: https://github.com/argon-rbx/argon/compare/2.0.0-pre1...2.0.0-pre2
[2.0.0-pre1]: https://github.com/argon-rbx/argon/compare/3057ca895492519fc29e7ab0bd8bdebc86d3e53c...2.0.0-pre1
[2.0.0-pre1]: https://github.com/argon-rbx/argon/compare/1.3.0...2.0.0-pre1
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "argon-rbx"
name = "argon"
authors = ["Dervex"]
description = "Full featured tool for Roblox development"
repository = "https://github.com/argon-rbx/argon"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

Argon is a powerful CLI that improves Roblox development experience. This is core part of Argon project as this is where all the processing happens. [Argon VS Code](https://github.com/argon-rbx/argon-vscode) extension is user-friendly wrapper of this CLI and [Argon Roblox](https://github.com/argon-rbx/argon-roblox) is a Roblox Studio plugin that is required for live syncing.

Some of the key Argon features:
Some of the key features of Argon:

- Two-Way sync of code and other instances with their properties
- Building projects in Roblox binary or XML format
Expand Down
8 changes: 4 additions & 4 deletions src/installer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ const QUICK_TEMPLATE: Dir = include_dir!("$CARGO_MANIFEST_DIR/assets/templates/q

const ARGON_PLUGIN: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/Argon.rbxm"));

pub fn is_aftman() -> bool {
pub fn is_managed() -> bool {
let path = match env::current_exe() {
Ok(path) => path,
Err(_) => return false,
};

path.contains(&[".aftman", "tool-storage"])
path.contains(&[".aftman", "tool-storage"]) || path.contains(&[".cargo", "bin"])
}

pub fn verify(is_aftman: bool, with_plugin: bool) -> Result<()> {
pub fn verify(is_managed: bool, with_plugin: bool) -> Result<()> {
let argon_dir = util::get_argon_dir()?;
let templates_dir = argon_dir.join("templates");

Expand All @@ -41,7 +41,7 @@ pub fn verify(is_aftman: bool, with_plugin: bool) -> Result<()> {
fs::create_dir(&templates_dir)?;
}

if !is_aftman {
if !is_managed {
let bin_dir = argon_dir.join("bin");

if !bin_dir.exists() {
Expand Down
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ fn main() {
let config_state = Config::load();
let config = Config::new();

let is_aftman = installer::is_aftman();
let installation = installer::verify(is_aftman, config.install_plugin);
let is_managed = installer::is_managed();
let installation = installer::verify(is_managed, config.install_plugin);

let cli = Cli::new();

Expand Down Expand Up @@ -57,7 +57,7 @@ fn main() {
}

let handle = thread::spawn(move || {
if !is_aftman && config.check_updates {
if !is_managed && config.check_updates {
match updater::check_for_updates(config.install_plugin, !config.auto_update) {
Ok(()) => info!("Update check completed successfully!"),
Err(err) => warn!("Update check failed: {}", err),
Expand Down
1 change: 1 addition & 0 deletions src/middleware/dir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pub fn read_dir(path: &Path, context: &Context, vfs: &Vfs) -> Result<Snapshot> {
#[profiling::function]
pub fn write_dir(path: &Path, vfs: &Vfs) -> Result<()> {
vfs.create_dir(path)?;
vfs.watch(path)?;

Ok(())
}
2 changes: 1 addition & 1 deletion src/middleware/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub fn new_snapshot_node(
if let Some(custom_path) = node.path {
let path = path_clean::clean(path.with_file_name(custom_path));

if path.is_file() {
if vfs.is_file(&path) {
vfs.watch(&path)?;
}

Expand Down

0 comments on commit df69a0e

Please sign in to comment.