capistrano-sumo 1.1.2 → 1.4.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7320b0a669bb776dd20ebe769b7854652e6434e29cf92d758efff768697960f5
|
4
|
+
data.tar.gz: 8aac0eaab418c6402379119ceaf4a1ea75c24bf81419b658fd649a38f0b22547
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c09f3a385d8aca2eee6d9ad07e31cd260f5f8dead0e7a085b61ee2d87cc43390ccd4ba4bc5b56c17107862cbf9fe138bbe53157b34640a2cfb31dea89662e515
|
7
|
+
data.tar.gz: 29d108227785fa3aa169b2698a1043a2ff9a234b83f5ac68ad05e4b05a56b005970f62b17ca5ddfbd0ae6f14d277864fab28e24ac29c47147b3672d5ba757d95
|
data/capistrano-sumo.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
end
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
|
-
spec.add_development_dependency 'bundler', '~> 1.
|
22
|
+
spec.add_development_dependency 'bundler', '~> 2.1.0'
|
23
23
|
spec.add_development_dependency 'rake', '~> 12.0'
|
24
24
|
spec.add_development_dependency 'rspec', '~> 3.6'
|
25
|
-
end
|
25
|
+
end
|
@@ -1,9 +1,17 @@
|
|
1
|
+
require 'json'
|
2
|
+
|
1
3
|
namespace :deploy do
|
4
|
+
package = JSON.parse(File.read('composer.json'))
|
5
|
+
|
6
|
+
# compile and upload the assets, but only if it's a Fork CMS project
|
7
|
+
after :updated, 'sumo:assets:put' if package['name'] == 'forkcms/forkcms'
|
8
|
+
|
2
9
|
# notify our bot about the deploy
|
3
10
|
after :finished, 'sumo:notifications:deploy'
|
4
11
|
end
|
5
12
|
|
6
13
|
# Load the tasks
|
14
|
+
load File.expand_path('../../tasks/assets.rake', __FILE__)
|
7
15
|
load File.expand_path('../../tasks/db.rake', __FILE__)
|
8
16
|
load File.expand_path('../../tasks/files.rake', __FILE__)
|
9
17
|
load File.expand_path('../../tasks/notifications.rake', __FILE__)
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'json'
|
2
|
+
|
3
|
+
namespace :sumo do
|
4
|
+
namespace :assets do
|
5
|
+
desc 'Compile the assets'
|
6
|
+
task :compile do
|
7
|
+
run_locally do
|
8
|
+
execute :gulp, '--silent', 'build:theme'
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
desc 'Uploads the build assets to the remote server'
|
13
|
+
task :put do
|
14
|
+
invoke 'sumo:assets:compile'
|
15
|
+
on roles(:web) do
|
16
|
+
remote_path = "#{release_path}/src/Frontend/Themes/#{theme}/Core"
|
17
|
+
|
18
|
+
# delete old folder
|
19
|
+
execute :rm, '-rf', remote_path
|
20
|
+
execute :mkdir, '-p', remote_path
|
21
|
+
|
22
|
+
# upload compiled theme
|
23
|
+
upload! "./src/Frontend/Themes/#{theme}/Core", "#{File.dirname(remote_path)}", recursive: true
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def theme
|
28
|
+
package = JSON.parse(File.read('package.json'))
|
29
|
+
|
30
|
+
if not package.key?('theme')
|
31
|
+
warn Airbrussh::Colors.red('✘') + ' No theme available in package.json.'
|
32
|
+
exit 1
|
33
|
+
end
|
34
|
+
|
35
|
+
package['theme']
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -2,15 +2,20 @@ namespace :sumo do
|
|
2
2
|
namespace :notifications do
|
3
3
|
desc 'Notify our webhooks on a deploy'
|
4
4
|
task :deploy do
|
5
|
+
# fetch the revision from the web-server
|
5
6
|
on roles(:web) do
|
7
|
+
set :revision, capture("cat #{current_path}/REVISION")
|
8
|
+
end
|
9
|
+
|
10
|
+
run_locally do
|
6
11
|
execute :curl,
|
7
12
|
'-sS',
|
8
13
|
"--data local_username=#{ENV["USER"]}",
|
9
14
|
"--data stage=#{fetch(:stage)}",
|
10
15
|
"--data repo=#{fetch(:repo_url)}",
|
11
|
-
"--data revision=#{
|
16
|
+
"--data revision=#{fetch(:revision)}",
|
12
17
|
'http://bot.sumo.sumoapp.be:3001/deploy/hook'
|
13
18
|
end
|
14
19
|
end
|
15
20
|
end
|
16
|
-
end
|
21
|
+
end
|
@@ -4,12 +4,12 @@ namespace :sumo do
|
|
4
4
|
task :enable do
|
5
5
|
on roles(:web) do
|
6
6
|
execute :mkdir, '-p', "#{shared_path}/redirect"
|
7
|
-
execute :wget, '-qO', "#{shared_path}/redirect/index.php http://static.sumocoders.be/
|
8
|
-
execute :wget, '-qO', "#{shared_path}/redirect/.htaccess http://static.sumocoders.be/
|
7
|
+
execute :wget, '-qO', "#{shared_path}/redirect/index.php http://static.sumocoders.be/redirect2/index.phps"
|
8
|
+
execute :wget, '-qO', "#{shared_path}/redirect/.htaccess http://static.sumocoders.be/redirect2/htaccess"
|
9
9
|
execute :sed, '-i', "'s|<real-url>|#{fetch :production_url}|' #{shared_path}/redirect/index.php"
|
10
10
|
execute :rm, '-f', "#{fetch :deploy_to}/current"
|
11
11
|
execute :ln, '-s', "#{shared_path}/redirect #{fetch :deploy_to}/current"
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
15
|
-
end
|
15
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-sumo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tijs Verkoyen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.1.0
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.1.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -70,6 +70,7 @@ files:
|
|
70
70
|
- lib/capistrano/sumo.rb
|
71
71
|
- lib/capistrano/sumo/defaults.rb
|
72
72
|
- lib/capistrano/sumo/version.rb
|
73
|
+
- lib/capistrano/tasks/assets.rake
|
73
74
|
- lib/capistrano/tasks/db.rake
|
74
75
|
- lib/capistrano/tasks/files.rake
|
75
76
|
- lib/capistrano/tasks/notifications.rake
|
@@ -93,8 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
94
|
- !ruby/object:Gem::Version
|
94
95
|
version: '0'
|
95
96
|
requirements: []
|
96
|
-
|
97
|
-
rubygems_version: 2.6.11
|
97
|
+
rubygems_version: 3.0.3
|
98
98
|
signing_key:
|
99
99
|
specification_version: 4
|
100
100
|
summary: SumoCoders specific task for Capistrano 3.x.
|