dev 2.0.64 → 2.0.66
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 +4 -4
- data/lib/dev_git.rb +8 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bd11e21b697cb45c72f7392839dd7074b5cac9b
|
4
|
+
data.tar.gz: fce36d38e69a3a877e83a4c981c344c87d8a7346
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47c39ad97595982df482e4a7526895f560658396e48636ba8a6e7f1d19261039b5bf1df96d6c266d04fcd26cfe5d15ce286b588739c6c00a36289a9a82279ea3
|
7
|
+
data.tar.gz: 6aea93194b313dbb0fb236d6625b73978bf2c03e3cc40d909da15b843e51d309956f3730e81619796a373572279cf367ff99c46f17cca8792bf650789d6f5c0f
|
data/lib/dev_git.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'tmpdir'
|
2
|
+
require 'rake'
|
2
3
|
|
3
4
|
class Git
|
4
5
|
def self.branch directory=''
|
@@ -69,7 +70,8 @@ class Git
|
|
69
70
|
end
|
70
71
|
end
|
71
72
|
|
72
|
-
def self.publish destination, source_dir,
|
73
|
+
def self.publish destination, source_dir, source_filelist, tag
|
74
|
+
puts "publish to #{destination}"
|
73
75
|
tmp_dir=Dir.mktmpdir
|
74
76
|
FileUtils.mkdir_p(File.dirname(tmp_dir)) if(!File.exists?(File.dirname(tmp_dir)))
|
75
77
|
FileUtils.rm_r(tmp_dir) if File.exists?(tmp_dir)
|
@@ -77,14 +79,17 @@ class Git
|
|
77
79
|
|
78
80
|
Dir.chdir(tmp_dir) do
|
79
81
|
tags=`git tag`
|
80
|
-
if(
|
82
|
+
if(tags.include?(tag))
|
83
|
+
puts "tag #{tag} already exists."
|
84
|
+
else
|
81
85
|
Dir.chdir(source_dir) do
|
82
|
-
|
86
|
+
source_filelist.each{|f|
|
83
87
|
dest = tmp_dir + "/" + f
|
84
88
|
FileUtils.cp(f,dest);
|
85
89
|
}
|
86
90
|
end
|
87
91
|
puts `git add -A`
|
92
|
+
puts `git commit -m"add"`
|
88
93
|
Git.tag tmp_dir,tag
|
89
94
|
end
|
90
95
|
end
|