github-release-party 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c3aeb5150e8e1d0815c605df468dbaa8b5689b7
4
- data.tar.gz: 2b77512c89c8d240a3936e9b87c36d4f4474e0ea
3
+ metadata.gz: 5e994205f46b30c1fe5233d3ea36fa7f086681a4
4
+ data.tar.gz: fa91c87eb4cf6953ef1d7c120656719ed19a0f55
5
5
  SHA512:
6
- metadata.gz: 91cea9e652666ee62b3cfea2a8f6d90e5350b45e8270a01df68eacc7a53ecbb57fe0fc2bd743051982640b71e04e56583b3fb4abe65e6414fed7c835091ddc0e
7
- data.tar.gz: caff089ab5e75a73d7a1d508fa0fb71ed34887561256e59b3703589fd9f6591b651d252abd9ac63d55421ef3c9cf0e2852597bf6a1ce7fe681e5ee8a170c49f4
6
+ metadata.gz: 05156b13c32dc228dd8048a0e9277d6a7f35744de2beb308676cd7f2dd5a7f26bf6efc555e4a511de22762251372fe872df847e5679d43a8690e464e96d689d3
7
+ data.tar.gz: e62cf3274a6aae8a2e20fcb259810c73eaca163ff4151bb6d143ace5cd566110d26c6d9f7cb84c03cd38d9d97f990ac1958bebc95e81350efff97459a8f05d69
@@ -32,10 +32,19 @@ namespace :deploy do
32
32
 
33
33
  # build tag message
34
34
  repo = GithubReleaseParty.repo
35
- last_tag = `git describe --tags --abbrev=0 --match 'heroku/v*'`.strip
35
+ last_tag = `git describe --tags --abbrev=0 --match 'heroku/v*' 2> /dev/null`.strip
36
+ if last_tag.empty?
37
+ # first deploy, use root hash
38
+ last_tag = `git rev-list --max-parents=0 HEAD`.strip[0..6]
39
+ first_deploy = true
40
+ end
36
41
  commits = `git log #{last_tag}..#{hash} --pretty=format:"- [%s](https://github.com/#{repo}/commit/%H)"`
37
42
  message = "Deploy #{hash[0..6]}\n\nDiff: https://github.com/#{repo}/compare/#{last_tag}...#{tag_name}\n#{commits}"
38
43
 
44
+ if first_deploy
45
+ message = "#{message.strip}\n"+`git show #{last_tag} -s --pretty=format:"- [%s](https://github.com/#{repo}/commit/%H)"`
46
+ end
47
+
39
48
  # tag and push new tag
40
49
  puts "Tagging #{tag_name}."
41
50
  success = system "git tag -a -m \"#{message.gsub('"','\\"')}\" #{tag_name} #{hash}"
@@ -1,3 +1,3 @@
1
1
  class GithubReleaseParty
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-release-party
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Sundin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-27 00:00:00.000000000 Z
11
+ date: 2015-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty