Skip to content

Commit

Permalink
Merge pull request #105 from jjyr/release-v0.9.2
Browse files Browse the repository at this point in the history
chore: bump v0.9.2
  • Loading branch information
jjyr authored Apr 24, 2023
2 parents f01abb0 + 57f79da commit 8905e01
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 8 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

The format is based on [Keep a Changelog](https://keepachangelog.com).

## [v0.9.2] - 2023-04-24

Misc:

* chore: generate project and contract without using docker #91
* chore: run 'capsule test' without docker #96
* chore: update README #98
* chore(ci): build binaries on ubuntu-20.04 #102

Full Changelog: https://github.com/nervosnetwork/capsule/compare/v0.9.1...v0.9.2

## [v0.9.1] - 2023-04-18

Features:
Expand All @@ -15,4 +26,4 @@ Misc:
* chore: remove dependency simple-jsonrpc-client and update reqwest #83
* chore: add ckb-testtool to capsule repository #90

Full Changelog: https://github.com/nervosnetwork/capsule/compare/v0.9.0...develop
Full Changelog: https://github.com/nervosnetwork/capsule/compare/v0.9.0...v0.9.1
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.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "ckb-capsule"
version = "0.9.1"
version = "0.9.2"
authors = ["Nervos Network"]
edition = "2021"
license = "MIT"
description = "Capsule is a development framework for creating smart contract for Nervos' CKB layer 1 blockchain."
description = "Capsule is a development framework for creating smart contract for Nervos' CKB."
homepage = "https://github.com/nervosnetwork/capsule"

[features]
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ CKB supports several programming languages for writing scripts, and the language

The following must be installed and available to use Capsule.

- Docker - Capsule uses `docker` to build contracts and run tests. https://docs.docker.com/get-docker/
- cargo - Capsule uses `cargo` to generate Rust contracts and run tests.
- docker - Capsule uses `docker` container to reproducible build contracts. https://docs.docker.com/get-docker/
- ckb-cli (optional) - Capsule requires `ckb-cli` to enable the smart contract deployment feature. https://github.com/nervosnetwork/ckb-cli/releases

Note: Docker and ckb-cli must be accessible in the `PATH` in order for them to be used by Capsule.
Expand Down
21 changes: 18 additions & 3 deletions src/checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,27 @@ fn check_cmd(program: &str, arg: &str) -> Result<Output> {
}

pub struct Checker {
pub docker: bool,
pub ckb_cli: Option<Vec<u8>>,
cargo: bool,
docker: bool,
ckb_cli: Option<Vec<u8>>,
}

impl Checker {
pub fn build(ckb_cli_bin: &str) -> Result<Self> {
let cargo = check_cmd("cargo", "version")
.map(|output| output.status.success())
.unwrap_or(false);
let docker = check_cmd("docker", "version")
.map(|output| output.status.success())
.unwrap_or(false);
let ckb_cli = check_cmd(ckb_cli_bin, "--version")
.map(|output| output.stdout)
.ok();
Ok(Checker { docker, ckb_cli })
Ok(Checker {
cargo,
docker,
ckb_cli,
})
}

pub fn check_ckb_cli(&self) -> Result<()> {
Expand All @@ -45,6 +53,13 @@ impl Checker {

pub fn print_report(&self) {
println!("------------------------------");
if self.cargo {
println!("cargo\tinstalled");
} else {
println!(
"cargo\tnot found - Please install rust (https://www.rust-lang.org/tools/install)"
);
}
if self.docker {
println!("docker\tinstalled");
} else {
Expand Down

0 comments on commit 8905e01

Please sign in to comment.