lzcode 0.0.8 → 0.1.0

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
  SHA1:
3
- metadata.gz: ef781ed96391386e63e8783d5abef0ce140aa339
4
- data.tar.gz: b5fc081738042f901d4d43471ae609b7963d2a53
3
+ metadata.gz: 2cad0d823eff7dcd5b8090f9a577316474d1034d
4
+ data.tar.gz: 1fa28f765a1e0f6c518e81b55600054d17f97d04
5
5
  SHA512:
6
- metadata.gz: dd3fae008af87029de099bb8ce9e9733adbe4933f448356a56862e9575e92cf9aa259a7b6fdab46ad507786121c064ed5b663e1b15dbeb232f73ab7d443ac7ef
7
- data.tar.gz: c6fbf72c833d22e6726f277f1ce5aa293984ffec9000b98f92b56ab50bb651e3e351d691f10ca4e4ad0f20b064822cfe5f84b4bd955215d7d1095cd5a5ee06b0
6
+ metadata.gz: 3a56d6d7eeae0f900d809d90e755511f67a42a237181e1a1cc87f7e8e4380e9c5c78aec8b2717a521b7b36017c409cf7b6187d527b5c8dc53c74d605089a63df
7
+ data.tar.gz: c2031a03ed9e8bff3d0471ecc1ae7a4f86e28bf02ad30b1f6bafc0bb2add18d05ad239040c2075a65b52c6312ae0110b2d4d7dd5df63796b48467766e1c0cf6b
@@ -1,3 +1,3 @@
1
1
  module Lzcode
2
- VERSION = "0.0.8"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -8,7 +8,7 @@ $Private_Token = ''
8
8
 
9
9
  $GitHTTP_Address = ''
10
10
 
11
- UserPathFile = File.expand_path('~')+'/.lzcode_user'
11
+ UserPathFile = File.expand_path('~')+'/.lz_user'
12
12
 
13
13
  class LZCodeGitLab
14
14
 
@@ -159,6 +159,8 @@ class LZCodeGitLab
159
159
 
160
160
  codeInfo = Hash.new
161
161
 
162
+ uri = "#{$GitHTTP_Address}/api/v4/projects?private_token=#{$Private_Token}&search=#{keyword}&per_page=100"
163
+
162
164
  data = httpInner("Searching",uri)
163
165
 
164
166
  info = Array.new
@@ -154,7 +154,7 @@ class LZCodeInner
154
154
  sayBye()
155
155
  else
156
156
  puts 'Performing update...'
157
- log = system("#{$ScriptPath}/source/z_update.sh #{path} #{ForkName}")
157
+ log = system("#{$ScriptPath}/z_update.sh #{path} #{ForkName}")
158
158
  if log == true
159
159
  puts 'Operation completed!'
160
160
  else
@@ -173,7 +173,7 @@ class LZCodeInner
173
173
  #Download
174
174
  def run_s_download(path,addr,forkAddr)
175
175
  puts 'Performing download...'
176
- log = system("#{$ScriptPath}/source/z_download.sh #{path} #{addr} #{forkAddr} #{ForkName}")
176
+ log = system("#{$ScriptPath}/z_download.sh #{path} #{addr} #{forkAddr} #{ForkName}")
177
177
  if log == true
178
178
  puts 'Operation completed!'
179
179
  else
@@ -287,7 +287,7 @@ class LZCodeInner
287
287
  sayBye()
288
288
  else
289
289
  puts 'Performing commit...'
290
- log = system("#{$ScriptPath}/source/z_submit.sh #{$Keyword} #{$ForkName}")
290
+ log = system("#{$ScriptPath}/z_submit.sh #{$Keyword} #{$ForkName}")
291
291
  if log == true
292
292
 
293
293
  puts 'Operation completed!'
@@ -9,10 +9,11 @@ ForkName=$4
9
9
 
10
10
  git clone $RemoteAddr
11
11
 
12
+ cd $Dir
13
+
12
14
  if [[ $ForkName != "" ]]
13
15
  then
14
- cd $Dir
15
-
16
+
16
17
  echo "Performing add ${ForkName}:${ForkAddr}"
17
18
 
18
19
  git remote add $ForkName $ForkAddr
@@ -23,5 +24,15 @@ then
23
24
 
24
25
  git merge $ForkName/master
25
26
 
26
- cd ..
27
- fi
27
+ fi
28
+
29
+ current_branch=$(git branch | awk '$1 == "*"{print $2}')
30
+
31
+ read -r -p "New Branch Name[\"Enter\" is current branch:$current_branch]:" input
32
+
33
+ if [[ $input != "" ]]
34
+ then
35
+ git checkout -b $current_branch
36
+ fi
37
+
38
+ cd ..
@@ -39,13 +39,17 @@ else
39
39
  git merge origin/master
40
40
  fi
41
41
 
42
- echo "Switch ${current_branch} branch."
42
+ if [[ "$current_branch" != "master" ]]
43
+ then
44
+
45
+ echo "Switch ${current_branch} branch."
43
46
 
44
- git checkout -f $current_branch
47
+ git checkout $current_branch
45
48
 
46
- echo "Update ${current_branch} branch."
49
+ echo "Update ${current_branch} branch."
47
50
 
48
- git rebase master
51
+ git rebase master
52
+ fi
49
53
 
50
54
  if [[ "$stash_result" == "" ]]
51
55
  then
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lzcode
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ningyuan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-22 00:00:00.000000000 Z
11
+ date: 2019-12-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: An automatic tool of GitLab.
14
14
  email:
@@ -20,7 +20,6 @@ executables:
20
20
  extensions: []
21
21
  extra_rdoc_files: []
22
22
  files:
23
- - ".gitignore"
24
23
  - CODE_OF_CONDUCT.md
25
24
  - Gemfile
26
25
  - LICENSE.txt
data/.gitignore DELETED
@@ -1,8 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/