sbs 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bbaf991750ed33b4d2e3faab2d56bc732beadfd45d282eff434f16ca25b8ed59
4
- data.tar.gz: 1425a95c9255349801093b727f3276516d810086c635e7a243b43317430a3f38
3
+ metadata.gz: 53d2077ffd1c5eaafaf76e60a1f28e0cf0a132ee989e431e118363d3b9f09e3b
4
+ data.tar.gz: e950679120088dab1023b37331cb3bd9748bc00c193b3d0fc8c08c5324df2d52
5
5
  SHA512:
6
- metadata.gz: bf34ce54886da3be6cb9801c51a67c144c574bc16a2019e565bbcf0c7f1bc3a4e77bcc890c18beb34cfd195bfccb507bea16255cfa5cabc1f7fffb3fdbd78eb7
7
- data.tar.gz: 6b4af3fdd7ad20e84e34b8712b703e9e74e30efe75ea1e193aa70609c5f038b21c47f4572b5bb43c5cb7d55ef69aac3d418d7f44a8fc65a82cfb2da44db705d9
6
+ metadata.gz: e59869e79d0021cef536f728cde7d59b06e87abe94d4e34046a40dead0122891ac4b216186d5ecdea372d802096b56e5930c169ff27dca4d2005486611beb9bb
7
+ data.tar.gz: 5213cb923293e5e08d72d3ad49b1e6e01c1130b640828d825688eb0ab6b7e26a0990d08c01a3f20dd2939d1ddf0cda0e9a18b06db28e2ac8445383602b930b12
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sbs (0.1.6)
4
+ sbs (0.1.7)
5
5
  activesupport (~> 5.2.3)
6
6
  colorize (~> 0.8.1)
7
7
  thor (~> 0.20.3)
data/README.md CHANGED
@@ -23,12 +23,14 @@ Or install it yourself as:
23
23
  - **new**: generate new blockchain from node-template
24
24
 
25
25
  ```shell
26
- # Default branch is master
26
+ # Default version is branch master
27
27
  sbs new testchain
28
28
 
29
- sbs new testchain -b v1.0
29
+ sbs new testchain -v a2a0eb5398d6223e531455b4c155ef053a4a3a2b
30
+
31
+ sbs new testchain -v v1.0
30
32
 
31
- sbs new testchain -b v1.0 -a author
33
+ sbs new testchain -v v1.0 -a author
32
34
  ```
33
35
 
34
36
  - **check**: Check your rust environment and substrate commits used by your project. Do it in your project directory
@@ -42,10 +44,10 @@ Or install it yourself as:
42
44
  ```shell
43
45
  # If fzf installed, a selectable diff list will appear, and the diff content will be displayed when you choose.
44
46
  # If no fzf, all diffs with content will be shown.
45
- sbs diff -b v1.0
47
+ sbs diff -v v1.0
46
48
 
47
49
  # Only list diffs without content.
48
- sbs diff -l -b v1.0
50
+ sbs diff -l -v v1.0
49
51
 
50
52
  # Default branch is master.
51
53
  sbs diff
data/lib/sbs/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sbs
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
data/lib/sbs.rb CHANGED
@@ -9,14 +9,14 @@ module Sbs
9
9
  class Error < StandardError; end
10
10
 
11
11
  class Cli < Thor
12
- desc "new CHAIN_NAME", "Create a new blockchain from substrate node template by branch."
12
+ desc "new CHAIN_NAME", "Create a new blockchain from substrate node template by branch or commit."
13
13
  option :author, :aliases => :a, :default => "wuminzhe"
14
- option :branch, :aliases => :b, :default => "master"
14
+ option :version, :aliases => :v, :default => "master"
15
15
  def new(chain_name)
16
16
  dest_dir = "."
17
17
 
18
18
  # generate your chain
19
- if generate_from_node_template(chain_name, options[:branch], options[:author], dest_dir)
19
+ if generate_from_node_template(chain_name, options[:version], options[:author], dest_dir)
20
20
  # build
21
21
  Dir.chdir("#{dest_dir}/#{chain_name}") do
22
22
  puts "*** Initializing WebAssembly build environment..."
@@ -70,10 +70,10 @@ module Sbs
70
70
  puts ""
71
71
  end
72
72
 
73
- desc "diff", "Show the difference between your substrate version and branch head. Do it in your project directory."
73
+ desc "diff", "Show the difference between your substrate version and branch head or commit. Do it in your project directory."
74
74
  option :list, :aliases => :l, :type => :boolean
75
75
  option :full, :aliases => :f, :type => :boolean
76
- option :branch, :aliases => :b, :default => "master"
76
+ option :version, :aliases => :v, :default => "master"
77
77
  def diff
78
78
  commits = get_commits
79
79
  if commits.length > 1
@@ -86,7 +86,7 @@ module Sbs
86
86
  substrate_dir = File.join(home, "substrate")
87
87
  tmp = File.join(home, "tmp", "/")
88
88
  tmp_dir_1 = File.join(tmp, "your")
89
- tmp_dir_2 = File.join(tmp, options[:branch])
89
+ tmp_dir_2 = File.join(tmp, options[:version])
90
90
  FileUtils.mkdir_p(tmp_dir_1)
91
91
  FileUtils.mkdir_p(tmp_dir_2)
92
92
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sbs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - wuminzhe