shuttle 1.1.0 → 1.2.0

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.
@@ -10,4 +10,11 @@ Shuttle.setup do |s|
10
10
  'shuttle:git:push'
11
11
  ]
12
12
 
13
+ # TODO: Setup Stages Description
14
+
15
+ # s.stages = {
16
+ # staging: 'your@server.com:staging-repository.git',
17
+ # production: 'your@server.com:production-repository.git'
18
+ # }
19
+
13
20
  end
data/lib/shuttle.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require "shuttle/railtie"
2
2
 
3
3
  module Shuttle
4
- mattr_accessor :steps
4
+ mattr_accessor :steps, :stages
5
5
 
6
6
  def self.setup
7
7
  yield self
@@ -1,3 +1,3 @@
1
1
  module Shuttle
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  end
@@ -36,7 +36,9 @@ namespace :shuttle do
36
36
  end
37
37
 
38
38
  desc 'Launch the code to the space!'
39
- task shuttle: :environment do
39
+ task :shuttle, :stage do |t, args|
40
+ Rake::Task[:environment].invoke
41
+
40
42
  if Shuttle.steps.blank?
41
43
  require 'colored'
42
44
 
@@ -55,4 +57,12 @@ task shuttle: :environment do
55
57
  Rake::Task[step].invoke
56
58
  end
57
59
  end
60
+
61
+ repository = Shuttle.stages[args[:stage].try(:to_sym)]
62
+
63
+ if repository.present?
64
+ p80("Executing deploy to #{args[:stage].to_s}...") do
65
+ sh "git push #{repository} HEAD:master -f"
66
+ end
67
+ end
58
68
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shuttle
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: