diff --git a/lib/apress/gems/cli.rb b/lib/apress/gems/cli.rb index ca911b1..f5432bb 100644 --- a/lib/apress/gems/cli.rb +++ b/lib/apress/gems/cli.rb @@ -48,6 +48,7 @@ def upload def tag tag_name = "v#{version}" spawn "git tag -a -m \"Version #{version}\" #{tag_name}" + spawn 'git push --tags upstream' puts "Git tag generated to #{tag_name}" end @@ -62,6 +63,7 @@ def release changelog update_version commit + tag build upload end @@ -97,7 +99,6 @@ def commit puts 'Commit and push changes' spawn "git diff --cached --exit-code > /dev/null || git commit -m \"Release #{version}\" || echo -n" spawn 'git push upstream master' - spawn 'git push --tags upstream' end def validate_version