tvd-tvdinner 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.5
1
+ 0.0.6
@@ -16,11 +16,10 @@ source "$shome/libexec/_jason"
16
16
  # define command line options:
17
17
  DEFINE_boolean "clean" "$FLAGS_FALSE" "delete destination branch contents"
18
18
  DEFINE_string "message" "published $(date)" "commit message for published content" "m"
19
+ DEFINE_force "force" "$FLAGS_FALSE" "force push to remote" "f"
19
20
 
20
21
  # entry point
21
22
  function main {
22
- set -x
23
-
24
23
  if [[ "$#" = 0 ]]; then
25
24
  local src_dir="output"
26
25
  else
@@ -74,8 +73,14 @@ function main {
74
73
  git commit -m "$FLAGS_message"
75
74
  git push origin "$dst_branch"
76
75
  popd > /dev/null
77
-
78
76
  rm -rf "$tmp_dir"
77
+
78
+ local opt_push=
79
+ if [[ "$FLAGS_force" = "$FLAGS_TRUE" ]]; then
80
+ opt_push="-f "
81
+ fi
82
+ git push $opt_push primary $dst_branch:refs/heads/$dst_branch
83
+ git push $opt_push secondary $dst_branch:refs/heads/$dst_branch || true
79
84
  }
80
85
 
81
86
  require sub "$BASH_SOURCE" "$@"
@@ -34,13 +34,19 @@ template "#{node[:release_dir]}/.gitignore" do
34
34
  /crash.log /output)})
35
35
  end
36
36
 
37
- %w(VERSION NOTICE README.md Gemfile).each do |f|
37
+ %w(NOTICE README.md Gemfile).each do |f|
38
38
  template "#{node[:release_dir]}/#{f}" do
39
39
  mode 00644
40
40
  source "#{f}.erb"
41
41
  end
42
42
  end
43
43
 
44
+ template "#{node[:release_dir]}/VERSION" do
45
+ mode 00644
46
+ source "VERSION.erb"
47
+ not_if { File.exists? "#{node[:release_dir]}/VERSION" }
48
+ end
49
+
44
50
  cookbook_file "#{node[:release_dir]}/LICENSE" do
45
51
  mode 00644
46
52
  source "LICENSE"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tvd-tvdinner
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tom Bombadil
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-02-23 00:00:00 -08:00
18
+ date: 2013-02-25 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency