Browse Source

Correctly gen version

master
Aditya Kulkarni 4 years ago
parent
commit
f50b86ed1e
  1. 2
      Cargo.lock
  2. 2
      cli/Cargo.toml
  3. 4
      cli/src/lib.rs
  4. 3
      cli/src/main.rs
  5. 1
      cli/src/version.rs
  6. 3
      mkrelease.sh

2
Cargo.lock generated

@ -2530,7 +2530,7 @@ dependencies = [
[[package]]
name = "zecwallet-cli"
version = "1.1.0"
version = "1.3.2"
dependencies = [
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",

2
cli/Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "zecwallet-cli"
version = "1.1.0"
version = "1.3.2"
edition = "2018"
[dependencies]

4
cli/src/lib.rs

@ -8,10 +8,12 @@ use zecwalletlitelib::{commands,
lightclient::{LightClient, LightClientConfig},
};
pub mod version;
#[macro_export]
macro_rules! configure_clapapp {
( $freshapp: expr ) => {
$freshapp.version("1.0.0")
$freshapp.version(VERSION)
.arg(Arg::with_name("dangerous")
.long("dangerous")
.help("Disable server TLS certificate verification. Use this if you're running a local lightwalletd with a self-signed certificate. WARNING: This is dangerous, don't use it with a server that is not your own.")

3
cli/src/main.rs

@ -3,7 +3,8 @@ use zecwallet_cli::{configure_clapapp,
report_permission_error,
startup,
start_interactive,
attempt_recover_seed};
attempt_recover_seed,
version::VERSION};
use log::error;
pub fn main() {

1
cli/src/version.rs

@ -0,0 +1 @@
pub const VERSION:&str = "1.3.2";

3
mkrelease.sh

@ -25,6 +25,9 @@ set -- "${POSITIONAL[@]}" # restore positional parameters
if [ -z $APP_VERSION ]; then echo "APP_VERSION is not set"; exit 1; fi
# Write the version file
echo "pub const VERSION:&str = \"$APP_VERSION\";" > cli/src/version.rs
# First, do the tests
cd lib && cargo test --release
retVal=$?

Loading…
Cancel
Save