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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +7 -5
- data/lib/sbs/version.rb +1 -1
- data/lib/sbs.rb +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53d2077ffd1c5eaafaf76e60a1f28e0cf0a132ee989e431e118363d3b9f09e3b
|
4
|
+
data.tar.gz: e950679120088dab1023b37331cb3bd9748bc00c193b3d0fc8c08c5324df2d52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e59869e79d0021cef536f728cde7d59b06e87abe94d4e34046a40dead0122891ac4b216186d5ecdea372d802096b56e5930c169ff27dca4d2005486611beb9bb
|
7
|
+
data.tar.gz: 5213cb923293e5e08d72d3ad49b1e6e01c1130b640828d825688eb0ab6b7e26a0990d08c01a3f20dd2939d1ddf0cda0e9a18b06db28e2ac8445383602b930b12
|
data/Gemfile.lock
CHANGED
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
|
26
|
+
# Default version is branch master
|
27
27
|
sbs new testchain
|
28
28
|
|
29
|
-
sbs new testchain -
|
29
|
+
sbs new testchain -v a2a0eb5398d6223e531455b4c155ef053a4a3a2b
|
30
|
+
|
31
|
+
sbs new testchain -v v1.0
|
30
32
|
|
31
|
-
sbs new testchain -
|
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 -
|
47
|
+
sbs diff -v v1.0
|
46
48
|
|
47
49
|
# Only list diffs without content.
|
48
|
-
sbs diff -l -
|
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
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 :
|
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[:
|
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 :
|
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[:
|
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
|
|