dngg 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd9d121406a49a1a7dae5b56c5e81530773d993123db786f3121fd6e2d852cef
4
- data.tar.gz: 5243df3729a8099d5afce4fbfd4d89df0d54177df7bdefdf80c59652dcb8cdaf
3
+ metadata.gz: 7b591c218e98539ba3f3396920f3599df088792c7d462bcc9f7fba0de7508644
4
+ data.tar.gz: d570f5aec0942c9d8a1ff09073c5542984bda92d67f9dd2af6e3564ae80264f2
5
5
  SHA512:
6
- metadata.gz: 8fe67c78d44ee0e0606a7759a35802a7551bf943c6505a5b16dd6e9e4d2757c30e6fa8f4706e97bc8125844345054d2b1093cefdf8dd86c27151537d809f5f50
7
- data.tar.gz: 42a2c2d243d42e84333d62658983d57c8226117ea410654e0e23b131a6b8f28b4e30ba1cd6d1a395009f52620d767fc302b3fd86389e72dc9f06afba72a1f8e6
6
+ metadata.gz: 3ec388bb39d326b157c9a4cc9656637172a9dd524f64542608f803e4e858673a4bbf5e942d3a2e4b4e12c24bea1990d3ef4a0fdc7e8897305fea67a7aef1cf23
7
+ data.tar.gz: de14584be918991a640729b5c1585d9f04f0946df917715736e06eb2b145fc72f776033267738ea5f7abd6df7d070ee9be6db785559ddda28cee7f9b9c6738e0
data/.gitignore CHANGED
@@ -6,3 +6,4 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ *.gem
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dngg (0.0.2)
4
+ dngg (0.0.3)
5
5
  colorize (= 0.8.1)
6
6
  oj (= 3.8.0)
7
7
  thor (= 1.0.0)
data/bin/dngg CHANGED
@@ -1,11 +1,12 @@
1
1
  #!/usr/bin/env ruby
2
- # require_relative "../lib/dngg.rb"
3
2
 
4
- set -euo pipefail
3
+ # set -euo pipefail
4
+ require_relative '../lib/dngg'
5
5
 
6
- IFS=$'\n\t'
7
- set -vx
6
+ # IFS=$'\n\t'
7
+ # set -vx
8
+ DNGG::Cli.start(ARGV)
8
9
 
9
- bundle install
10
+ # bundle install
10
11
 
11
12
  # Do any other automated setup that you need to do here
data/lib/dngg.rb CHANGED
@@ -1,77 +1,77 @@
1
- require 'thor'
2
- require_relative 'dngg/version'
3
- require_relative 'dngg/command/start'
4
- require_relative 'dngg/command/sync'
5
- require_relative 'dngg/command/switch'
6
- require_relative 'dngg/command/delete'
7
- require_relative 'dngg/command/foreach'
8
- require_relative 'dngg/command/merge'
9
- require_relative 'dngg/command/finish'
10
- require_relative 'dngg/command/mr'
11
-
12
- module DNGG
13
- class Cli < Thor
14
- include Start
15
- include Sync
16
- include Switch
17
- include Delete
18
- include Foreach
19
- include Merge
20
- include Finish
21
- include MR
22
-
23
- desc 'sync', '当前分支同步(拉取)远程代码'
24
- def sync
25
- sync_flow
26
- end
27
-
28
- desc 'start <branch> [<commit>] [<origin>]', '检出新分支,新功能、修bug务必使用该命令'
29
- def start(branch, action='')
30
- start_flow(branch, action)
31
- end
32
-
33
- desc 'merge <branch> [-r|--rebase]', 'Merge,开发完成后执行; -r:主工程强制rebase'
34
- option :rebase, :default => false, :type => :boolean, aliases: '-r'
35
- def merge(branch)
36
- rebase = options[:rebase]
37
- merge_flow(branch, rebase)
38
- end
39
-
40
- desc 'finish [-f|--force]', 'Merge后并解决冲突后执行; -f:主工程强制推送'
41
- option :force, :default => false, :type => :boolean, aliases: '-f'
42
- def finish
43
- force = options[:force]
44
- finish_flow(force)
45
- end
46
-
47
- desc 'mr <branch> <title>', '创建MR'
48
- def mr(branch, title)
49
- mr_flow(branch, title)
50
- end
51
-
52
- desc 'switch <branch>', '切换分支'
53
- def switch(branch)
54
- switch_flow(branch)
55
- end
56
-
57
- desc 'delete <branch> [-r|--remote] [-a|--all]', '删除指定分支'
58
- option :remote, :default => false, :type => :boolean, aliases: '-r'
59
- option :all, :default => false, :type => :boolean, aliases: '-a'
60
- def delete(branch)
61
- remote = options[:remote]
62
- all = options[:all]
63
- delete_flow(branch, remote, all)
64
- end
65
-
66
- desc 'foreach [<commands>...]', '所有模块执行git命令(foreach后跟git命令)'
67
- def foreach(*commands)
68
- foreach_flow(*commands)
69
- end
70
-
71
- desc 'v', '查看版本'
72
- def version
73
- puts VERSION
74
- end
75
- end
76
- # Cli.start(ARGV)
77
- end
1
+ require 'thor'
2
+ require_relative 'dngg/version'
3
+ require_relative 'dngg/command/start'
4
+ require_relative 'dngg/command/sync'
5
+ require_relative 'dngg/command/switch'
6
+ require_relative 'dngg/command/delete'
7
+ require_relative 'dngg/command/foreach'
8
+ require_relative 'dngg/command/merge'
9
+ require_relative 'dngg/command/finish'
10
+ require_relative 'dngg/command/mr'
11
+
12
+ module DNGG
13
+ class Cli < Thor
14
+ include Start
15
+ include Sync
16
+ include Switch
17
+ include Delete
18
+ include Foreach
19
+ include Merge
20
+ include Finish
21
+ include MR
22
+
23
+ desc 'sync', '当前分支同步(拉取)远程代码'
24
+ def sync
25
+ sync_flow
26
+ end
27
+
28
+ desc 'start <branch> [<commit>] [<origin>]', '检出新分支,新功能、修bug务必使用该命令'
29
+ def start(branch, action='')
30
+ start_flow(branch, action)
31
+ end
32
+
33
+ desc 'merge <branch> [-r|--rebase]', 'Merge,开发完成后执行; -r:主工程强制rebase'
34
+ option :rebase, :default => false, :type => :boolean, aliases: '-r'
35
+ def merge(branch)
36
+ rebase = options[:rebase]
37
+ merge_flow(branch, rebase)
38
+ end
39
+
40
+ desc 'finish [-f|--force]', 'Merge后并解决冲突后执行; -f:主工程强制推送'
41
+ option :force, :default => false, :type => :boolean, aliases: '-f'
42
+ def finish
43
+ force = options[:force]
44
+ finish_flow(force)
45
+ end
46
+
47
+ desc 'mr <branch> <title>', '创建MR'
48
+ def mr(branch, title)
49
+ mr_flow(branch, title)
50
+ end
51
+
52
+ desc 'switch <branch>', '切换分支'
53
+ def switch(branch)
54
+ switch_flow(branch)
55
+ end
56
+
57
+ desc 'delete <branch> [-r|--remote] [-a|--all]', '删除指定分支'
58
+ option :remote, :default => false, :type => :boolean, aliases: '-r'
59
+ option :all, :default => false, :type => :boolean, aliases: '-a'
60
+ def delete(branch)
61
+ remote = options[:remote]
62
+ all = options[:all]
63
+ delete_flow(branch, remote, all)
64
+ end
65
+
66
+ desc 'foreach [<commands>...]', '所有模块执行git命令(foreach后跟git命令)'
67
+ def foreach(*commands)
68
+ foreach_flow(*commands)
69
+ end
70
+
71
+ desc 'v', '查看版本'
72
+ def version
73
+ puts VERSION
74
+ end
75
+ end
76
+ # Cli.start(ARGV)
77
+ end
@@ -2,7 +2,6 @@ module DNGG
2
2
  module Hooks
3
3
  def check_hooks
4
4
  if update_hooks
5
- install_billow
6
5
  subs = get_submodule
7
6
  subs.each do |sub|
8
7
  cp_hooks(sub)
@@ -10,11 +9,6 @@ module DNGG
10
9
  end
11
10
  end
12
11
 
13
- def install_billow
14
- path = `gem which dngg`.split('/dngg.rb')[0]
15
- `sudo sh #{path}/res/install_billow.sh`
16
- end
17
-
18
12
  def update_hooks
19
13
  version = `dngg v`
20
14
  ggsm_path = '.git/dngg'
data/lib/dngg/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module DNGG
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dngg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - iSnow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-19 00:00:00.000000000 Z
11
+ date: 2021-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -85,7 +85,6 @@ files:
85
85
  - lib/dngg/util/stash.rb
86
86
  - lib/dngg/util/submodule.rb
87
87
  - lib/dngg/version.rb
88
- - lib/res/install_billow.sh
89
88
  homepage: http://rubygems.org/gems/dngg
90
89
  licenses:
91
90
  - MIT
@@ -1,33 +0,0 @@
1
- # # 下载
2
- # curl -o ~/billow.zip http://7xq884.com1.z0.glb.clouddn.com/Billow.zip
3
-
4
- # pushd ~/Library/Application\ Support
5
-
6
- # # 解压到Application Support/AS
7
- # for file in ./AndroidStudio*
8
- # do
9
- # if test -d $file
10
- # then
11
- # pushd ~/Library/Application\ Support/$file
12
- # unzip -o ~/billow.zip
13
- # popd
14
- # fi
15
- # done
16
-
17
- # popd
18
-
19
- # # 修改Preferences,开启插件
20
- # for file in ~/Library/Preferences/AndroidStudio*
21
- # do
22
- # if test -d $file
23
- # then
24
- # sed '/^com.souche.plugin.billow/'d $file/disabled_plugins.txt > disabled_plugins_billow.txt
25
- # cp disabled_plugins_billow.txt $file/disabled_plugins.txt
26
- # rm -rf disabled_plugins_billow.txt
27
- # fi
28
- # done
29
-
30
- # rm -rf ~/billow.zip
31
-
32
- # echo Billow安装成功,请重新启动AndroidStudio
33
-