Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.7.0 #82

Merged
merged 10 commits into from
Oct 13, 2020
Merged
Show file tree
Hide file tree
Changes from 6 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
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# Version v0.7.0-rc1 (2020-10-13)

* Fix deprecation warnings [#82](https://github.com/paritytech/cargo-contract/pull/82)
* Use ink 3.0.0-rc1 [#82](https://github.com/paritytech/cargo-contract/pull/82)
* [template] now uses ink_env and ink_storage [#81](https://github.com/paritytech/cargo-contract/pull/81)
* Update new command template to ink! 3.0 syntax [#80](https://github.com/paritytech/cargo-contract/pull/80)
* Extract contract metadata to its own crate [#69](https://github.com/paritytech/cargo-contract/pull/69)
* Fix ManifestPath compiler errors [#73](https://github.com/paritytech/cargo-contract/pull/73)
* Upgrade cargo-xbuild and other dependencies [#71](https://github.com/paritytech/cargo-contract/pull/71)
* Update subxt and async-std dependencies [#66](https://github.com/paritytech/cargo-contract/pull/66)
* Generate extended contract metadata [#62](https://github.com/paritytech/cargo-contract/pull/62)
* Autogenerate abi/metadata package [#58](https://github.com/paritytech/cargo-contract/pull/58)
* Extract workspace to module directory [#59](https://github.com/paritytech/cargo-contract/pull/59)
* Add preferred default release profile settings [#55](https://github.com/paritytech/cargo-contract/pull/55)
* Add option to build with unmodified original manifest [#51](https://github.com/paritytech/cargo-contract/pull/51)
* Update cargo-xbuild [#54](https://github.com/paritytech/cargo-contract/pull/54)

# Version 0.6.1 (2020-05-12)

- Fix LTO regressions in nightly toolchain [#52](https://github.com/paritytech/cargo-contract/pull/52)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ A CLI tool for helping setting up and managing WebAssembly smart contracts writt
- **wasm-opt**: https://github.com/WebAssembly/binaryen#tools

- **Install latest version from [crates.io](https://crates.io/crates/cargo-contract)**
- `cargo install cargo-contract`
- `cargo install cargo-contract --version 0.7.0-rc1`

## Usage

```
cargo-contract 0.3.0
cargo-contract 0.7.0
Utilities to develop Wasm smart contracts.

USAGE:
Expand Down
6 changes: 4 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,17 @@ fn zip_dir(src_dir: &PathBuf, dst_file: &PathBuf, method: CompressionMethod) ->
name.set_file_name("Cargo.toml");
}

let file_path = name.as_os_str().to_string_lossy();

if path.is_file() {
zip.start_file_from_path(name.as_path(), options)?;
zip.start_file(file_path, options)?;
let mut f = File::open(path)?;

f.read_to_end(&mut buffer)?;
zip.write_all(&*buffer)?;
buffer.clear();
} else if name.as_os_str().len() != 0 {
zip.add_directory_from_path(name.as_path(), options)?;
zip.add_directory(file_path, options)?;
}
}
zip.finish()?;
Expand Down
7 changes: 2 additions & 5 deletions src/cmd/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ where
let contents = contents.replace("{{name}}", name);
let contents = contents.replace("{{camel_name}}", &name.to_camel_case());

let outpath = out_dir.join(file.sanitized_name());
let outpath = out_dir.join(file.name());

if (&*file.name()).ends_with('/') {
fs::create_dir_all(&outpath)?;
Expand All @@ -73,10 +73,7 @@ where
.open(outpath.clone())
.map_err(|e| {
if e.kind() == std::io::ErrorKind::AlreadyExists {
anyhow::anyhow!(
"New contract file {} already exists",
file.sanitized_name().display()
)
anyhow::anyhow!("New contract file {} already exists", file.name())
} else {
anyhow::anyhow!(e)
}
Expand Down
12 changes: 6 additions & 6 deletions templates/new/_Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ authors = ["[your_name] <[your_email]>"]
edition = "2018"

[dependencies]
ink_metadata = { git = "https://github.com/paritytech/ink", branch = "master", package = "ink_metadata", default-features = false, features = ["derive"], optional = true }
ink_primitives = { git = "https://github.com/paritytech/ink", branch = "master", default-features = false }
ink_env = { git = "https://github.com/paritytech/ink", branch = "master", package = "ink_env", default-features = false }
ink_storage = { git = "https://github.com/paritytech/ink", branch = "master", package = "ink_storage", default-features = false }
ink_lang = { git = "https://github.com/paritytech/ink", branch = "master", package = "ink_lang", default-features = false }
ink_primitives = { version = "3.0.0-rc1", default-features = false }
ink_metadata = { version = "3.0.0-rc1", default-features = false, features = ["derive"], optional = true }
ink_env = { version = "3.0.0-rc1", default-features = false }
ink_storage = { version = "3.0.0-rc1", default-features = false }
ink_lang = { version = "3.0.0-rc1", default-features = false }

scale = { package = "parity-scale-codec", version = "1.3", default-features = false, features = ["derive"] }
scale-info = { version = "0.3", default-features = false, features = ["derive"], optional = true }
scale-info = { version = "0.4", default-features = false, features = ["derive"], optional = true }

[lib]
name = "{{name}}"
Expand Down