metals 0.1.3

A meta programming language for Composable Systems
Documentation
# Copyright 2022 Weavers @ Eternal Loom. All rights reserved.
# Use of this software is governed by the license that can be
# found in LICENSE file in the source repository.

#!/usr/bin/env just --justfile

# The toolchain to use. Change the line below to switch toolchain.
toolchain := "+stable"
# toolchain := "+nightly"

# By default, build and run tests
default: test

# Build the debug version
build:
    cargo {{toolchain}} build

# Clean everything
clean:
    cargo clean

# Run tests 
test:
    cargo {{toolchain}} test

# Build docs
doc open="":
    cargo {{toolchain}} doc --no-deps --{{open}}

# Just an alias for doc
docs open="": (doc open)

# Build and run examples
exam cmd="build":
    cargo {{toolchain}} {{cmd}} --example 

# Publish dry run
publish version: (update version)
    cargo {{toolchain}} publish --dry-run

# Publish to crates.io
# - Tags the release in git
# - Publish
# NOTE: Want to make sure the version in Cargo.toml is > the one in the 
# registry
push version: (update version) (gittag version)
    cargo {{toolchain}} publish

# Analyze and report errors, don't build binaries
check:
    cargo {{toolchain}} check

# Run benchmarks
bench:
    cargo {{toolchain}} bench


# Update version in cargo.toml
# NOTE: We only should update version number under packages section. This
# needs some work. Not done now
# Manually update the version right now
@update version: (check_version version)
    echo "AUTO UPDATE OF VERSION IS NOT IMPLEMENTED. PLEASE MANUALLY CHECK FOR NOW"

# Check version
# NOTE: Really want to check that the current version is greater than the 
# one in registry
@check_version version:
    echo "AUTO VERIFICATION OF VERSION IS NOT IMPLEMENTED. PLEASE MANUALLY CHECK FOR NOW"

@gittag version:
    #!/usr/bin/env bash
    git tag -a v{{version}} -m "Release {{version}}"
    git push origin v{{version}}

@delete_gittag version:
    #!/usr/bin/env bash
    git tag -d v{{version}}
    git push origin --delete v{{version}}