vagrant-tagprovision 0.2.0 → 0.2.1
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/README.md +11 -3
- data/lib/vagrant-tagprovision/action.rb +3 -3
- data/lib/vagrant-tagprovision/version.rb +1 -1
- metadata +2 -3
- data/LICENSE.txt +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38c37be176c6d6aadd1cc4c88e65795adbe8256b
|
4
|
+
data.tar.gz: 77c8c9477754bc094cdbbca5af8e991d7a1ba072
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28765bf335c3c44f66d4f9924e8575a308dde1d064b9cd9ede2899307f66e32e3a25154c8fe7a2db668e37ce0e0301b0fbeda3527ccc568db15d799526543eca
|
7
|
+
data.tar.gz: 4a589dcd7fbf7b6ca606ea791ef55c9f2d1a864409c277827b9fefa7603150bcf6728e36a6f7cd2a66d7be446a8c035f2b35376b33ae494d623bfad577f99ca9
|
data/README.md
CHANGED
@@ -25,9 +25,9 @@ end
|
|
25
25
|
```
|
26
26
|
|
27
27
|
config.tagprovision.enabled - This enables and disables the plugin
|
28
|
-
config.tagprovision.log_provision - This creates an entry in /var/provision_log on the guest machine with the following format:
|
28
|
+
config.tagprovision.log_provision - This creates an entry in /var/log/provision_log on the guest machine with the following format:
|
29
29
|
|
30
|
-
2016-01-11 11:31:42 +0000 Provisioned a41c6eb98bd069f85bc205fae24298e644a9b877
|
30
|
+
2016-01-11 11:31:42 +0000 Provisioned a41c6eb98bd069f85bc205fae24298e644a9b877 refs/tags/current_release_1.3.2
|
31
31
|
|
32
32
|
config.tagprovision.tag_provision - This will create a git tag with provisioning information
|
33
33
|
config.tagprovision.push_tag - This automatically pushes the tag to the origin your current branch is tracking
|
@@ -44,10 +44,18 @@ To install dependencies use:
|
|
44
44
|
bundle install
|
45
45
|
```
|
46
46
|
|
47
|
-
Then use
|
47
|
+
Then use:
|
48
48
|
```
|
49
49
|
bundle exec vagrant provision
|
50
50
|
```
|
51
|
+
|
52
|
+
You may need to create the guest by running:
|
53
|
+
|
54
|
+
```
|
55
|
+
bundle exec vagrant up
|
56
|
+
```
|
57
|
+
|
58
|
+
|
51
59
|
To test on the test VM.
|
52
60
|
|
53
61
|
### Building and deploying gem packages
|
@@ -11,7 +11,7 @@ module VagrantPlugins
|
|
11
11
|
@machinfo = env[:machine]
|
12
12
|
@commit_hash = `git rev-parse HEAD`
|
13
13
|
@commit_hash.strip!
|
14
|
-
@
|
14
|
+
@current_tag = `git symbolic-ref -q HEAD || git describe --tags --exact-match`
|
15
15
|
@time = Time.new
|
16
16
|
@tag = "provisioned_#{@machine}_#{@time.year}#{@time.month}#{@time.day}#{@time.hour}#{@time.min}#{@time.sec}"
|
17
17
|
@machine_env = @machinfo.env;
|
@@ -42,7 +42,7 @@ module VagrantPlugins
|
|
42
42
|
if(@config.tagprovision.log_provision)
|
43
43
|
log_provision(env)
|
44
44
|
end
|
45
|
-
if(@config.tagprovision.
|
45
|
+
if(@config.tagprovision.tag_provision)
|
46
46
|
tag_provision(env)
|
47
47
|
end
|
48
48
|
end
|
@@ -102,7 +102,7 @@ module VagrantPlugins
|
|
102
102
|
def update_file(file, resolving_machine = nil, include_id = true)
|
103
103
|
#update the file with the current state of the vagrant config and the user provisioning
|
104
104
|
file = Pathname.new(file)
|
105
|
-
file_content_line = "#{@time.inspect}\tProvisioned\t#{@commit_hash}\t#{@
|
105
|
+
file_content_line = "#{@time.inspect}\tProvisioned\t#{@commit_hash}\t#{@current_tag}"
|
106
106
|
old_file_content = file.read
|
107
107
|
new_file_content = old_file_content + "#{file_content_line}"
|
108
108
|
file.open('wb') { |io| io.write(new_file_content) }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-tagprovision
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jimrobinson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -47,7 +47,6 @@ extra_rdoc_files: []
|
|
47
47
|
files:
|
48
48
|
- ".gitignore"
|
49
49
|
- Gemfile
|
50
|
-
- LICENSE.txt
|
51
50
|
- README.md
|
52
51
|
- Rakefile
|
53
52
|
- Vagrantfile
|
data/LICENSE.txt
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
Copyright (c) 2014 Brett Swift
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|