salesforce-deploy-tool 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Rakefile +17 -0
- data/lib/salesforcedeploytool/version.rb +1 -1
- 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: 50f38c12d0a9f2254c01941f8e9ae0ffaf551a5d
|
4
|
+
data.tar.gz: f3ac2dbaa369d0cf932ad0f99639d3e1a7c44a29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3deaf8344c35cfc5219ddd7d874ce7603b7743fac4cb1e7c688716c831edf307efdeda0e4546f26047eb8991394ccea76b8bb032871cf195ccceca9da6bd7141
|
7
|
+
data.tar.gz: 1aaa5f98a67a1c9ab95e548cb8f15b4d7db6cda83a351105be713f8d7606f3224bbf1fdea57204c66aa9e00520046ac8f77a0668566edac25e274ab6238e31f0
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -1,2 +1,19 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
|
3
|
+
# extracted from https://github.com/grosser/project_template
|
4
|
+
rule /^version:bump:.*/ do |t|
|
5
|
+
sh "git status | grep 'nothing to commit'" # ensure we are not dirty
|
6
|
+
index = ['major', 'minor','patch'].index(t.name.split(':').last)
|
7
|
+
file = 'lib/salesforcedeploytool/version.rb'
|
8
|
+
|
9
|
+
version_file = File.read(file)
|
10
|
+
old_version, *version_parts = version_file.match(/(\d+)\.(\d+)\.(\d+)/).to_a
|
11
|
+
version_parts[index] = version_parts[index].to_i + 1
|
12
|
+
version_parts[2] = 0 if index < 2
|
13
|
+
version_parts[1] = 0 if index < 1
|
14
|
+
new_version = version_parts * '.'
|
15
|
+
File.open(file,'w'){|f| f.write(version_file.sub(old_version, new_version)) }
|
16
|
+
|
17
|
+
sh "bundle && git add #{file} && git commit -m 'bump version to #{new_version}'"
|
18
|
+
end
|
19
|
+
|