capistrano_shopware6 0.1.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: e1d28a4294bfb7d2aa9c17c7e979df6194a154be0e2409ae9adaa2528ac5e1a2
4
+ data.tar.gz: 41bf31c3434afd01541a5dc89605592a11e2762677bce4657e931c06784530a1
5
+ SHA512:
6
+ metadata.gz: bbbe52c8e709b84cff2795f1f656d950cb9ab4ed23bd698f3b8cc87f1fc1a7480e64496af12a77f62a751c7ff963cb5f7e15bb535d0a7bc50f878e758cc0f0c4
7
+ data.tar.gz: eca73ef88b268c18a31023702b3461e5688366cb6e9c6d37d8ff08fade92fd7b3bc8f8e0963e28806f391d676bd721bcf811c947962e9286493b140307530030
@@ -0,0 +1,3 @@
1
+ *.gem
2
+ Gemfile.lock
3
+ *.swp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'rake-release'
4
+ gemspec
@@ -0,0 +1,172 @@
1
+ Open Software License ("OSL") v 3.0
2
+
3
+ This Open Software License (the "License") applies to any original work of
4
+ authorship (the "Original Work") whose owner (the "Licensor") has placed the
5
+ following licensing notice adjacent to the copyright notice for the Original
6
+ Work:
7
+
8
+ Licensed under the Open Software License version 3.0
9
+
10
+ 1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free,
11
+ non-exclusive, sublicensable license, for the duration of the copyright, to do
12
+ the following:
13
+
14
+ a) to reproduce the Original Work in copies, either alone or as part of a
15
+ collective work;
16
+
17
+ b) to translate, adapt, alter, transform, modify, or arrange the Original
18
+ Work, thereby creating derivative works ("Derivative Works") based upon the
19
+ Original Work;
20
+
21
+ c) to distribute or communicate copies of the Original Work and Derivative
22
+ Works to the public, with the proviso that copies of Original Work or
23
+ Derivative Works that You distribute or communicate shall be licensed under
24
+ this Open Software License;
25
+
26
+ d) to perform the Original Work publicly; and
27
+
28
+ e) to display the Original Work publicly.
29
+
30
+ 2) Grant of Patent License. Licensor grants You a worldwide, royalty-free,
31
+ non-exclusive, sublicensable license, under patent claims owned or controlled
32
+ by the Licensor that are embodied in the Original Work as furnished by the
33
+ Licensor, for the duration of the patents, to make, use, sell, offer for sale,
34
+ have made, and import the Original Work and Derivative Works.
35
+
36
+ 3) Grant of Source Code License. The term "Source Code" means the preferred
37
+ form of the Original Work for making modifications to it and all available
38
+ documentation describing how to modify the Original Work. Licensor agrees to
39
+ provide a machine-readable copy of the Source Code of the Original Work along
40
+ with each copy of the Original Work that Licensor distributes. Licensor
41
+ reserves the right to satisfy this obligation by placing a machine-readable
42
+ copy of the Source Code in an information repository reasonably calculated to
43
+ permit inexpensive and convenient access by You for as long as Licensor
44
+ continues to distribute the Original Work.
45
+
46
+ 4) Exclusions From License Grant. Neither the names of Licensor, nor the names
47
+ of any contributors to the Original Work, nor any of their trademarks or
48
+ service marks, may be used to endorse or promote products derived from this
49
+ Original Work without express prior permission of the Licensor. Except as
50
+ expressly stated herein, nothing in this License grants any license to
51
+ Licensor's trademarks, copyrights, patents, trade secrets or any other
52
+ intellectual property. No patent license is granted to make, use, sell, offer
53
+ for sale, have made, or import embodiments of any patent claims other than the
54
+ licensed claims defined in Section 2. No license is granted to the trademarks
55
+ of Licensor even if such marks are included in the Original Work. Nothing in
56
+ this License shall be interpreted to prohibit Licensor from licensing under
57
+ terms different from this License any Original Work that Licensor otherwise
58
+ would have a right to license.
59
+
60
+ 5) External Deployment. The term "External Deployment" means the use,
61
+ distribution, or communication of the Original Work or Derivative Works in any
62
+ way such that the Original Work or Derivative Works may be used by anyone
63
+ other than You, whether those works are distributed or communicated to those
64
+ persons or made available as an application intended for use over a network.
65
+ As an express condition for the grants of license hereunder, You must treat
66
+ any External Deployment by You of the Original Work or a Derivative Work as a
67
+ distribution under section 1(c).
68
+
69
+ 6) Attribution Rights. You must retain, in the Source Code of any Derivative
70
+ Works that You create, all copyright, patent, or trademark notices from the
71
+ Source Code of the Original Work, as well as any notices of licensing and any
72
+ descriptive text identified therein as an "Attribution Notice." You must cause
73
+ the Source Code for any Derivative Works that You create to carry a prominent
74
+ Attribution Notice reasonably calculated to inform recipients that You have
75
+ modified the Original Work.
76
+
77
+ 7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that
78
+ the copyright in and to the Original Work and the patent rights granted herein
79
+ by Licensor are owned by the Licensor or are sublicensed to You under the
80
+ terms of this License with the permission of the contributor(s) of those
81
+ copyrights and patent rights. Except as expressly stated in the immediately
82
+ preceding sentence, the Original Work is provided under this License on an "AS
83
+ IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without
84
+ limitation, the warranties of non-infringement, merchantability or fitness for
85
+ a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK
86
+ IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this
87
+ License. No license to the Original Work is granted by this License except
88
+ under this disclaimer.
89
+
90
+ 8) Limitation of Liability. Under no circumstances and under no legal theory,
91
+ whether in tort (including negligence), contract, or otherwise, shall the
92
+ Licensor be liable to anyone for any indirect, special, incidental, or
93
+ consequential damages of any character arising as a result of this License or
94
+ the use of the Original Work including, without limitation, damages for loss
95
+ of goodwill, work stoppage, computer failure or malfunction, or any and all
96
+ other commercial damages or losses. This limitation of liability shall not
97
+ apply to the extent applicable law prohibits such limitation.
98
+
99
+ 9) Acceptance and Termination. If, at any time, You expressly assented to this
100
+ License, that assent indicates your clear and irrevocable acceptance of this
101
+ License and all of its terms and conditions. If You distribute or communicate
102
+ copies of the Original Work or a Derivative Work, You must make a reasonable
103
+ effort under the circumstances to obtain the express assent of recipients to
104
+ the terms of this License. This License conditions your rights to undertake
105
+ the activities listed in Section 1, including your right to create Derivative
106
+ Works based upon the Original Work, and doing so without honoring these terms
107
+ and conditions is prohibited by copyright law and international treaty.
108
+ Nothing in this License is intended to affect copyright exceptions and
109
+ limitations (including "fair use" or "fair dealing"). This License shall
110
+ terminate immediately and You may no longer exercise any of the rights granted
111
+ to You by this License upon your failure to honor the conditions in Section
112
+ 1(c).
113
+
114
+ 10) Termination for Patent Action. This License shall terminate automatically
115
+ and You may no longer exercise any of the rights granted to You by this
116
+ License as of the date You commence an action, including a cross-claim or
117
+ counterclaim, against Licensor or any licensee alleging that the Original Work
118
+ infringes a patent. This termination provision shall not apply for an action
119
+ alleging patent infringement by combinations of the Original Work with other
120
+ software or hardware.
121
+
122
+ 11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this
123
+ License may be brought only in the courts of a jurisdiction wherein the
124
+ Licensor resides or in which Licensor conducts its primary business, and under
125
+ the laws of that jurisdiction excluding its conflict-of-law provisions. The
126
+ application of the United Nations Convention on Contracts for the
127
+ International Sale of Goods is expressly excluded. Any use of the Original
128
+ Work outside the scope of this License or after its termination shall be
129
+ subject to the requirements and penalties of copyright or patent law in the
130
+ appropriate jurisdiction. This section shall survive the termination of this
131
+ License.
132
+
133
+ 12) Attorneys' Fees. In any action to enforce the terms of this License or
134
+ seeking damages relating thereto, the prevailing party shall be entitled to
135
+ recover its costs and expenses, including, without limitation, reasonable
136
+ attorneys' fees and costs incurred in connection with such action, including
137
+ any appeal of such action. This section shall survive the termination of this
138
+ License.
139
+
140
+ 13) Miscellaneous. If any provision of this License is held to be
141
+ unenforceable, such provision shall be reformed only to the extent necessary
142
+ to make it enforceable.
143
+
144
+ 14) Definition of "You" in This License. "You" throughout this License,
145
+ whether in upper or lower case, means an individual or a legal entity
146
+ exercising rights under, and complying with all of the terms of, this License.
147
+ For legal entities, "You" includes any entity that controls, is controlled by,
148
+ or is under common control with you. For purposes of this definition,
149
+ "control" means (i) the power, direct or indirect, to cause the direction or
150
+ management of such entity, whether by contract or otherwise, or (ii) ownership
151
+ of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial
152
+ ownership of such entity.
153
+
154
+ 15) Right to Use. You may use the Original Work in all ways not otherwise
155
+ restricted or conditioned by this License or by law, and Licensor promises not
156
+ to interfere with or be responsible for such uses by You.
157
+
158
+ 16) Modification of This License. This License is Copyright © 2005 Lawrence
159
+ Rosen. Permission is granted to copy, distribute, or communicate this License
160
+ without modification. Nothing in this License permits You to modify this
161
+ License as applied to the Original Work or to Derivative Works. However, You
162
+ may modify the text of this License and copy, distribute or communicate your
163
+ modified version (the "Modified License") and apply it to other original works
164
+ of authorship subject to the following conditions: (i) You may not indicate in
165
+ any way that your Modified License is the "Open Software License" or "OSL" and
166
+ you may not use those names in the name of your Modified License; (ii) You
167
+ must replace the notice specified in the first paragraph above with the notice
168
+ "Licensed under <insert your license name here>" or with a notice of your own
169
+ that is not confusingly similar to the notice in this License; and (iii) You
170
+ may not claim that your original works are open source software unless your
171
+ Modified License has been approved by Open Source Initiative (OSI) and You
172
+ comply with its license review and certification process.
@@ -0,0 +1,28 @@
1
+ Capistrano tasks for Shopware6
2
+ ===============================
3
+
4
+ This gem contains instructions to deploy a [Shopware](https://www.shopware.com) 6 instance with [Capistrano](https://capistranorb.com/).
5
+
6
+ Details
7
+ -------
8
+
9
+ Deployment process has the following steps:
10
+
11
+ * `composer install`
12
+ * `psh.phar storefront:build`
13
+ * `bin/console assets:install`
14
+ * `bin/console maintenance:enable`
15
+ * `bin/console database:migrate`
16
+ * `bin/console maintenance:disable`
17
+ * `bin/console cache:warmup`
18
+
19
+ Usage
20
+ -----
21
+
22
+ To use this gem add this to your `Gemfile`
23
+
24
+ `gem "capistrano_shopware6", git: "git@github.com:giacmir/capistrano-shopware6.git"`
25
+
26
+ and then this line to your `Capfile`
27
+
28
+ `require "capistrano/shopware"`
@@ -0,0 +1 @@
1
+ require 'rake/release'
@@ -0,0 +1,13 @@
1
+ Gem::Specification.new do |s|
2
+ s.authors = ['Giacomo Mirabassi']
3
+ s.name = %q{capistrano_shopware6}
4
+ s.version = "0.1.0"
5
+ s.date = %q{2020-08-28}
6
+ s.summary = %q{Capistrano deploy instructions for Shopware 6}
7
+ s.require_paths = ["lib"]
8
+ s.files = `git ls-files`.split($/)
9
+ s.license = "OSL-3.0"
10
+ s.homepage = 'https://github.com/giacmir/capistrano-shopware6'
11
+
12
+ s.add_dependency 'capistrano', '~> 3.0'
13
+ end
@@ -0,0 +1 @@
1
+ load File.expand_path("../tasks/shopware.rake", __FILE__)
@@ -0,0 +1,104 @@
1
+ set :linked_dirs, fetch(:linked_dirs, []).push(
2
+ 'config/jwt',
3
+ 'files',
4
+ 'var/log',
5
+ 'public/media',
6
+ 'public/thumbnail',
7
+ 'public/sitemap'
8
+ )
9
+
10
+ set :linked_files, fetch(:linked_files, []).push(
11
+ '.psh.yaml'
12
+ )
13
+
14
+ namespace :composer do
15
+ task :install do
16
+ on roles(:app) do
17
+ within release_path do
18
+ execute :composer, :install
19
+ end
20
+ end
21
+ end
22
+ end
23
+
24
+ namespace :shopware do
25
+ namespace :psh do
26
+ task :execute, :param do |t, args|
27
+ on roles(:app) do
28
+ within release_path do
29
+ execute './psh.phar', args[:param]
30
+ end
31
+ end
32
+ end
33
+
34
+ namespace :storefront do
35
+ task :build do
36
+ invoke! 'shopware:psh:execute', 'storefront:install-dependencies'
37
+ invoke! 'shopware:psh:execute', 'storefront:build'
38
+ end
39
+ end
40
+
41
+ namespace :administration do
42
+ task :build do
43
+ invoke! 'shopware:psh:execute', 'administration:install-dependencies'
44
+ invoke! 'shopware:psh:execute', 'administration:build'
45
+ end
46
+ end
47
+ end
48
+
49
+ namespace :console do
50
+ task :execute, :param do |t, args|
51
+ on roles(:app) do
52
+ within "#{current_path}" do
53
+ execute 'bin/console', args[:param]
54
+ end
55
+ end
56
+ end
57
+
58
+ task :theme_compile do
59
+ invoke! 'shopware:console:execute', 'theme:compile'
60
+ end
61
+
62
+ task :cache_clear do
63
+ invoke! 'shopware:console:execute', 'cache:clear'
64
+ end
65
+
66
+ task :cache_warmup do
67
+ invoke! 'shopware:console:execute', 'cache:warmup'
68
+ invoke! 'shopware:console:execute', 'http:cache:warm:up'
69
+ end
70
+
71
+ task :assets_install do
72
+ invoke! 'shopware:console:execute', 'assets:install'
73
+ end
74
+
75
+ task :database_migrate do
76
+ invoke! 'shopware:console:execute', 'database:migrate --all'
77
+ end
78
+
79
+ task :maintenance_enable do
80
+ invoke! 'shopware:console:execute', 'sales-channel:maintenance:enable --all'
81
+ end
82
+
83
+ task :maintenance_disable do
84
+ invoke! 'shopware:console:execute', 'sales-channel:maintenance:disable --all'
85
+ end
86
+ end
87
+ end
88
+
89
+
90
+ namespace :deploy do
91
+ after :updated, :shopware do
92
+ invoke 'composer:install'
93
+ invoke 'shopware:psh:administration:build'
94
+ invoke 'shopware:psh:storefront:build'
95
+ invoke 'shopware:console:assets_install'
96
+ invoke 'shopware:console:maintenance_enable'
97
+ end
98
+
99
+ after :published, :shopware do
100
+ invoke 'shopware:console:database_migrate'
101
+ invoke 'shopware:console:maintenance_disable'
102
+ invoke 'shopware:console:cache_warmup'
103
+ end
104
+ end
File without changes
metadata ADDED
@@ -0,0 +1,65 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano_shopware6
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Giacomo Mirabassi
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-08-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: capistrano
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.0'
27
+ description:
28
+ email:
29
+ executables: []
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - ".gitignore"
34
+ - Gemfile
35
+ - LICENSE.txt
36
+ - README.md
37
+ - Rakefile
38
+ - capistrano-magento2.gemspec
39
+ - lib/capistrano/shopware.rb
40
+ - lib/capistrano/tasks/shopware.rake
41
+ - lib/capistrano_shopware6.rb
42
+ homepage: https://github.com/giacmir/capistrano-shopware6
43
+ licenses:
44
+ - OSL-3.0
45
+ metadata: {}
46
+ post_install_message:
47
+ rdoc_options: []
48
+ require_paths:
49
+ - lib
50
+ required_ruby_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ requirements: []
61
+ rubygems_version: 3.0.8
62
+ signing_key:
63
+ specification_version: 4
64
+ summary: Capistrano deploy instructions for Shopware 6
65
+ test_files: []