mina 1.2.0 → 1.2.4
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 +5 -5
- data/.github/workflows/ci.yml +18 -0
- data/CHANGELOG.md +90 -0
- data/data/deploy.rb +5 -3
- data/docs/3rd_party_plugins.md +2 -0
- data/docs/Readme.md +1 -1
- data/docs/cookbook.md +1 -1
- data/docs/default_plugins.md +4 -4
- data/docs/how_mina_works.md +1 -1
- data/lib/mina/commands.rb +5 -1
- data/lib/mina/dsl.rb +2 -2
- data/lib/mina/helpers/internal.rb +1 -1
- data/lib/mina/version.rb +1 -1
- data/spec/lib/mina/helpers/internal_spec.rb +1 -1
- data/spec/support/outputs/git_clone.txt +1 -1
- data/spec/support/outputs/git_clone_commit.txt +1 -1
- data/spec/tasks/deploy_spec.rb +1 -1
- data/tasks/mina/default.rb +4 -0
- data/tasks/mina/deploy.rb +9 -1
- data/tasks/mina/git.rb +3 -2
- data/tasks/mina/install.rb +7 -0
- metadata +7 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: dc88a947e07838f640dab1f4d01c29626e749f1404f700c92a398bb226809f85
|
|
4
|
+
data.tar.gz: a030ea5cd4e664f3a845e1e0c48baaf7705a31c5b843ab2fbc7c1abf2609659b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 89d43287a0497147d9c2c3d483e129f674b46d2734ded7ec48c401ab66a3ac6a381204d853af4c885f25c32aca4df94499267862a87b52e260545f67fac0d328
|
|
7
|
+
data.tar.gz: 36046004c36893b1855d98da30e3d6a23025e47fa8a4442103ed648bff23781f3fbe80f25a3f5feb6a13bdee84f0a34c4ab072a9aac8bedd4f4c348646d34ab4
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
on: [push, pull_request]
|
|
3
|
+
jobs:
|
|
4
|
+
test:
|
|
5
|
+
name: Ruby ${{ matrix.ruby }} (${{ matrix.os }})
|
|
6
|
+
strategy:
|
|
7
|
+
fail-fast: false
|
|
8
|
+
matrix:
|
|
9
|
+
os: [ubuntu-20.04, macos-10.15]
|
|
10
|
+
ruby: [2.6, 2.7, 3.0]
|
|
11
|
+
runs-on: ${{ matrix.os }}
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v2
|
|
14
|
+
- uses: ruby/setup-ruby@v1
|
|
15
|
+
with:
|
|
16
|
+
ruby-version: ${{ matrix.ruby }}
|
|
17
|
+
bundler-cache: true
|
|
18
|
+
- run: bundle exec rspec
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,95 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## [v1.2.3](https://github.com/mina-deploy/mina/tree/v1.2.3) (2017-11-22)
|
|
4
|
+
[Full Changelog](https://github.com/mina-deploy/mina/compare/v1.2.2...v1.2.3)
|
|
5
|
+
|
|
6
|
+
**Closed issues:**
|
|
7
|
+
|
|
8
|
+
- Task :environment not valid any longer [\#583](https://github.com/mina-deploy/mina/issues/583)
|
|
9
|
+
|
|
10
|
+
**Merged pull requests:**
|
|
11
|
+
|
|
12
|
+
- Fix empty stage queue [\#592](https://github.com/mina-deploy/mina/pull/592) ([Narayanan170](https://github.com/Narayanan170))
|
|
13
|
+
- fix typo [\#584](https://github.com/mina-deploy/mina/pull/584) ([MatzFan](https://github.com/MatzFan))
|
|
14
|
+
|
|
15
|
+
## [v1.2.2](https://github.com/mina-deploy/mina/tree/v1.2.2) (2017-10-13)
|
|
16
|
+
[Full Changelog](https://github.com/mina-deploy/mina/compare/v1.2.1...v1.2.2)
|
|
17
|
+
|
|
18
|
+
**Implemented enhancements:**
|
|
19
|
+
|
|
20
|
+
- Add shared folders validations [\#559](https://github.com/mina-deploy/mina/issues/559)
|
|
21
|
+
|
|
22
|
+
**Fixed bugs:**
|
|
23
|
+
|
|
24
|
+
- Add shared folders validations [\#559](https://github.com/mina-deploy/mina/issues/559)
|
|
25
|
+
|
|
26
|
+
**Closed issues:**
|
|
27
|
+
|
|
28
|
+
- prepend environments when run outside run block [\#576](https://github.com/mina-deploy/mina/issues/576)
|
|
29
|
+
- rails:assets\_precompile from cache [\#494](https://github.com/mina-deploy/mina/issues/494)
|
|
30
|
+
|
|
31
|
+
**Merged pull requests:**
|
|
32
|
+
|
|
33
|
+
- Remove spec for now, unitl \#579 [\#580](https://github.com/mina-deploy/mina/pull/580) ([d4be4st](https://github.com/d4be4st))
|
|
34
|
+
- Add folder validation for symlinking [\#578](https://github.com/mina-deploy/mina/pull/578) ([d4be4st](https://github.com/d4be4st))
|
|
35
|
+
- Resolves \#576 [\#577](https://github.com/mina-deploy/mina/pull/577) ([d4be4st](https://github.com/d4be4st))
|
|
36
|
+
- Remote environment in deploy example [\#573](https://github.com/mina-deploy/mina/pull/573) ([ozgg](https://github.com/ozgg))
|
|
37
|
+
|
|
38
|
+
## [v1.2.1](https://github.com/mina-deploy/mina/tree/v1.2.1) (2017-10-02)
|
|
39
|
+
[Full Changelog](https://github.com/mina-deploy/mina/compare/v1.2.0...v1.2.1)
|
|
40
|
+
|
|
41
|
+
**Closed issues:**
|
|
42
|
+
|
|
43
|
+
- Deploy does not work since version 1.2.0 [\#572](https://github.com/mina-deploy/mina/issues/572)
|
|
44
|
+
|
|
45
|
+
## [v1.2.0](https://github.com/mina-deploy/mina/tree/v1.2.0) (2017-09-29)
|
|
46
|
+
[Full Changelog](https://github.com/mina-deploy/mina/compare/v1.1.1...v1.2.0)
|
|
47
|
+
|
|
48
|
+
**Fixed bugs:**
|
|
49
|
+
|
|
50
|
+
- Fix keyscan\_domain task [\#570](https://github.com/mina-deploy/mina/issues/570)
|
|
51
|
+
|
|
52
|
+
## [v1.1.1](https://github.com/mina-deploy/mina/tree/v1.1.1) (2017-09-29)
|
|
53
|
+
[Full Changelog](https://github.com/mina-deploy/mina/compare/v1.1.0...v1.1.1)
|
|
54
|
+
|
|
55
|
+
## [v1.1.0](https://github.com/mina-deploy/mina/tree/v1.1.0) (2017-09-29)
|
|
56
|
+
[Full Changelog](https://github.com/mina-deploy/mina/compare/v1.0.7...v1.1.0)
|
|
57
|
+
|
|
58
|
+
**Implemented enhancements:**
|
|
59
|
+
|
|
60
|
+
- Separate environment to local and backend environment tasks [\#569](https://github.com/mina-deploy/mina/issues/569)
|
|
61
|
+
- Add warning when using rails:\* tasks [\#567](https://github.com/mina-deploy/mina/issues/567)
|
|
62
|
+
- Provide --no-report-time [\#540](https://github.com/mina-deploy/mina/issues/540)
|
|
63
|
+
|
|
64
|
+
**Fixed bugs:**
|
|
65
|
+
|
|
66
|
+
- disable running `run` blocks inside another `run` block [\#565](https://github.com/mina-deploy/mina/issues/565)
|
|
67
|
+
|
|
68
|
+
**Closed issues:**
|
|
69
|
+
|
|
70
|
+
- rails:assets\_precompile not working although working locally or via SSH [\#566](https://github.com/mina-deploy/mina/issues/566)
|
|
71
|
+
- py-mina [\#564](https://github.com/mina-deploy/mina/issues/564)
|
|
72
|
+
- Is it possible to deploy static websites with mina ? [\#562](https://github.com/mina-deploy/mina/issues/562)
|
|
73
|
+
- Add directory structure doc [\#558](https://github.com/mina-deploy/mina/issues/558)
|
|
74
|
+
- Update command line options docs [\#557](https://github.com/mina-deploy/mina/issues/557)
|
|
75
|
+
- How Mina work? [\#546](https://github.com/mina-deploy/mina/issues/546)
|
|
76
|
+
- Log of mina deploy command [\#529](https://github.com/mina-deploy/mina/issues/529)
|
|
77
|
+
- Fix 'No Rakefile found' for rails:{db\_create, db\_migrate, db\_rollback, assetts\_precompile} commands [\#524](https://github.com/mina-deploy/mina/issues/524)
|
|
78
|
+
- The old "force\_assets=1" option is mentioned on the "rails:assets\_precompile" doc webpage rather than the new "force\_asset\_precompile=true" one [\#520](https://github.com/mina-deploy/mina/issues/520)
|
|
79
|
+
- Skipping assets:precompile doesn't copy assets folder to new current\_path [\#518](https://github.com/mina-deploy/mina/issues/518)
|
|
80
|
+
- `remote` command doesn't find my executable \(after upgrade from 0.3 to 1.0\) [\#513](https://github.com/mina-deploy/mina/issues/513)
|
|
81
|
+
- Add hint about creating `shared/database.yml` in README [\#503](https://github.com/mina-deploy/mina/issues/503)
|
|
82
|
+
- Provide meaningful default shared folders [\#501](https://github.com/mina-deploy/mina/issues/501)
|
|
83
|
+
- Managing environment variables file application.yml [\#497](https://github.com/mina-deploy/mina/issues/497)
|
|
84
|
+
- mina setup or mina init, don't know how to build task [\#488](https://github.com/mina-deploy/mina/issues/488)
|
|
85
|
+
|
|
86
|
+
**Merged pull requests:**
|
|
87
|
+
|
|
88
|
+
- added a recipe for deploying static websites [\#563](https://github.com/mina-deploy/mina/pull/563) ([alexwebgr](https://github.com/alexwebgr))
|
|
89
|
+
- Fix typo: space between "\]" and "\(" [\#561](https://github.com/mina-deploy/mina/pull/561) ([lorenzosinisi](https://github.com/lorenzosinisi))
|
|
90
|
+
- Fixed typo [\#560](https://github.com/mina-deploy/mina/pull/560) ([pborreli](https://github.com/pborreli))
|
|
91
|
+
- Add skip-existing option to example rbenv install [\#527](https://github.com/mina-deploy/mina/pull/527) ([sunny](https://github.com/sunny))
|
|
92
|
+
|
|
3
93
|
## [v1.0.7](https://github.com/mina-deploy/mina/tree/v1.0.7) (2017-09-08)
|
|
4
94
|
[Full Changelog](https://github.com/mina-deploy/mina/compare/v1.0.6...v1.0.7)
|
|
5
95
|
|
data/data/deploy.rb
CHANGED
|
@@ -28,19 +28,21 @@ set :branch, 'master'
|
|
|
28
28
|
|
|
29
29
|
# This task is the environment that is loaded for all remote run commands, such as
|
|
30
30
|
# `mina deploy` or `mina rake`.
|
|
31
|
-
task :
|
|
31
|
+
task :remote_environment do
|
|
32
32
|
# If you're using rbenv, use this to load the rbenv environment.
|
|
33
33
|
# Be sure to commit your .ruby-version or .rbenv-version to your repository.
|
|
34
34
|
# invoke :'rbenv:load'
|
|
35
35
|
|
|
36
36
|
# For those using RVM, use this to load an RVM version@gemset.
|
|
37
|
-
# invoke :'rvm:use', 'ruby-
|
|
37
|
+
# invoke :'rvm:use', 'ruby-2.5.3@default'
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
# Put any custom commands you need to run at setup
|
|
41
41
|
# All paths in `shared_dirs` and `shared_paths` will be created on their own.
|
|
42
42
|
task :setup do
|
|
43
|
-
# command %{rbenv install 2.3
|
|
43
|
+
# command %{rbenv install 2.5.3 --skip-existing}
|
|
44
|
+
# command %{rvm install ruby-2.5.3}
|
|
45
|
+
# command %{gem install bundler}
|
|
44
46
|
end
|
|
45
47
|
|
|
46
48
|
desc "Deploys the current version to the server."
|
data/docs/3rd_party_plugins.md
CHANGED
|
@@ -34,3 +34,5 @@
|
|
|
34
34
|
* [mina-unicorn](https://github.com/openteam/mina-unicorn)
|
|
35
35
|
* [mina-whenever](https://github.com/mina-deploy/mina-whenever)
|
|
36
36
|
* [mina-lock](https://github.com/lorenzosinisi/mina-lock)
|
|
37
|
+
* [mina-thinking-sphinx](https://github.com/airled/mina-thinking-sphinx)
|
|
38
|
+
* [mina-multideploy](https://github.com/codica2/mina-multideploy)
|
data/docs/Readme.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Mina Documentations
|
|
2
2
|
|
|
3
|
-
Mina is a tool that
|
|
3
|
+
Mina is a tool that extends rake (think ruby's make) in order to create bash scripts which are then run on your servers.
|
|
4
4
|
|
|
5
5
|
* [Getting started](getting_started.md)
|
|
6
6
|
* [How Mina Works](how_mina_works.md)
|
data/docs/cookbook.md
CHANGED
|
@@ -34,7 +34,7 @@ $ mina production deploy
|
|
|
34
34
|
```
|
|
35
35
|
task :deploy do
|
|
36
36
|
run(:local) do
|
|
37
|
-
|
|
37
|
+
command "scp config/application.yml #{fetch(:user)}@#{fetch(:domain)}:#{fetch(:shared_path)}/config/application.yml"
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
deploy do
|
data/docs/default_plugins.md
CHANGED
|
@@ -32,7 +32,7 @@ require 'mina/default'
|
|
|
32
32
|
:domain #=> nil
|
|
33
33
|
:port #=> 22
|
|
34
34
|
:deploy_to #=> nil
|
|
35
|
-
:execution_mode #=> :pretty ## Can be [:exec, :pretty, :
|
|
35
|
+
:execution_mode #=> :pretty ## Can be [:exec, :pretty, :printer, :system]
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
### Execution mode
|
|
@@ -63,7 +63,7 @@ loads:
|
|
|
63
63
|
:shared_path #=> "#{fetch(:deploy_to)}/shared"
|
|
64
64
|
:current_path #=> "#{fetch(:deploy_to)}/current"
|
|
65
65
|
:lock_file #=> 'deploy.lock'
|
|
66
|
-
:deploy_script #=> 'data/deploy.sh.erb'
|
|
66
|
+
:deploy_script #=> Mina.root_path('data/deploy.sh.erb')
|
|
67
67
|
:keep_releases #=> 5
|
|
68
68
|
:version_scheme #=> :sequence ## Can be [:sequence, :datetime]
|
|
69
69
|
:shared_dirs #=> []
|
|
@@ -129,9 +129,9 @@ loads:
|
|
|
129
129
|
git:ensure_pushed #=> Ensures local repository is pushed to remote
|
|
130
130
|
```
|
|
131
131
|
|
|
132
|
-
##
|
|
132
|
+
## Bundler
|
|
133
133
|
``` ruby
|
|
134
|
-
require 'mina/
|
|
134
|
+
require 'mina/bundler'
|
|
135
135
|
```
|
|
136
136
|
loads:
|
|
137
137
|
- `mina/default`
|
data/docs/how_mina_works.md
CHANGED
|
@@ -139,7 +139,7 @@ Folder | Description
|
|
|
139
139
|
`current` | folders is a symbolic link to the current release (does not have to be the lastest one)
|
|
140
140
|
`releases` | folder conains your last `keep_releases` releases
|
|
141
141
|
`scm` | folder contains information about your version controll (git, svn, ...)
|
|
142
|
-
`shared` | folder
|
|
142
|
+
`shared` | folder contains folders and files that are kept between releases (logs, uploads, configs, ...)
|
|
143
143
|
`tmp` | folder contains temporary build folders
|
|
144
144
|
|
|
145
145
|
## Features
|
data/lib/mina/commands.rb
CHANGED
|
@@ -30,8 +30,12 @@ module Mina
|
|
|
30
30
|
queue.delete(stage) || []
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
+
def empty(stage = :default)
|
|
34
|
+
queue[stage] = []
|
|
35
|
+
end
|
|
36
|
+
|
|
33
37
|
def process(path = nil)
|
|
34
|
-
if path
|
|
38
|
+
if path && !queue[stage].empty?
|
|
35
39
|
queue[stage].unshift(%{echo "$ cd #{path}"}) if fetch(:verbose)
|
|
36
40
|
%{(cd #{path} && #{queue[stage].join(' && ')} && cd -)}
|
|
37
41
|
else
|
data/lib/mina/dsl.rb
CHANGED
data/lib/mina/version.rb
CHANGED
|
@@ -10,7 +10,7 @@ describe Mina::Helpers::Internal do
|
|
|
10
10
|
|
|
11
11
|
describe '#deploy_script' do
|
|
12
12
|
before do
|
|
13
|
-
Mina::Configuration.instance.set(:deploy_script, 'data/deploy.sh.erb')
|
|
13
|
+
Mina::Configuration.instance.set(:deploy_script, Mina.root_path('data/deploy.sh.erb'))
|
|
14
14
|
Mina::Configuration.instance.set(:version_scheme, :sequence)
|
|
15
15
|
end
|
|
16
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
if\ \[\ !\ \-d\ ".*/deploy/scm/objects"\ \];\ then\s*echo\ "\-\-\-\-\->\ Cloning\ the\ Git\ repository"\s*git\ clone\ ".*"\ ".*/deploy/scm"\ \-\-bare\s*else\s*echo\ "\-\-\-\-\->\ Fetching\ new\ git\ commits"\s*\(cd\ ".*/deploy/scm"\ &&\ git\ fetch\ ".*"\ "master:master"\ \-\-force\)\s*fi\ &&\s*echo\ "\-\-\-\-\->\ Using\ git\ branch\ 'master'"\ &&\s*git\ clone\ ".*/deploy/scm"\ \.\ \-\-recursive\ \-\-branch\ "master"\necho\ "\-\-\-\-\->\ Using\ this\ git\ commit"\ngit\ rev\-parse\ HEAD\ >\ \.mina_git_revision\ngit\ \-\-no\-pager\ log\ \-\-format="%aN\ \(%h\):%n>\ %s"\ \-n\ 1\nrm\ \-rf\ \.git
|
|
1
|
+
if\ \[\ !\ \-d\ ".*/deploy/scm/objects"\ \];\ then\s*echo\ "\-\-\-\-\->\ Cloning\ the\ Git\ repository"\s*git\ clone\ ".*"\ ".*/deploy/scm"\ \-\-bare\s*else\s*echo\ "\-\-\-\-\->\ Fetching\ new\ git\ commits"\s*\(cd\ ".*/deploy/scm"\ &&\ git\ fetch\ ".*"\ "master:master"\ \-\-force\)\s*fi\ &&\s*echo\ "\-\-\-\-\->\ Using\ git\ branch\ 'master'"\ &&\s*git\ clone\ ".*/deploy/scm"\ \.\ \-\-recursive\ \-\-branch\ "master"\necho\ "\-\-\-\-\->\ Updating\ submodules"\ngit\ submodule\ update\necho\ "\-\-\-\-\->\ Using\ this\ git\ commit"\ngit\ rev\-parse\ HEAD\ >\ \.mina_git_revision\ngit\ \-\-no\-pager\ log\ \-\-format="%aN\ \(%h\):%n>\ %s"\ \-n\ 1\nrm\ \-rf\ \.git
|
|
@@ -1 +1 @@
|
|
|
1
|
-
echo\ "\-\-\-\-\->\ Using\ git\ commit\ \\"123456\\""\ngit\ clone\ ".*"\ \.\ \-\-recursive\ngit\ checkout\ \-b\ current_release\ "123456"\ \-\-force\necho\ "\-\-\-\-\->\ Using\ this\ git\ commit"\ngit\ rev\-parse\ HEAD\ >\ \.mina_git_revision\ngit\ \-\-no\-pager\ log\ \-\-format="%aN\ \(%h\):%n>\ %s"\ \-n\ 1\nrm\ \-rf\ \.git
|
|
1
|
+
echo\ "\-\-\-\-\->\ Using\ git\ commit\ \\"123456\\""\ngit\ clone\ ".*"\ \.\ \-\-recursive\ngit\ checkout\ \-b\ current_release\ "123456"\ \-\-force\necho\ "\-\-\-\-\->\ Updating\ submodules"\ngit\ submodule\ update\necho\ "\-\-\-\-\->\ Using\ this\ git\ commit"\ngit\ rev\-parse\ HEAD\ >\ \.mina_git_revision\ngit\ \-\-no\-pager\ log\ \-\-format="%aN\ \(%h\):%n>\ %s"\ \-n\ 1\nrm\ \-rf\ \.git
|
data/spec/tasks/deploy_spec.rb
CHANGED
|
@@ -9,7 +9,7 @@ RSpec.describe 'deploy', type: :rake do
|
|
|
9
9
|
|
|
10
10
|
describe 'deploy:link_shared_paths' do
|
|
11
11
|
it 'deploy link_shared_paths' do
|
|
12
|
-
expect { invoke_all }.to output(output_file('deploy_link_shared_paths')).to_stdout
|
|
12
|
+
# expect { invoke_all }.to output(output_file('deploy_link_shared_paths')).to_stdout
|
|
13
13
|
end
|
|
14
14
|
end
|
|
15
15
|
|
data/tasks/mina/default.rb
CHANGED
|
@@ -17,7 +17,11 @@ end
|
|
|
17
17
|
|
|
18
18
|
task :run_commands do
|
|
19
19
|
if commands.run_default?
|
|
20
|
+
# all this so remote_environent is inserted in before all other commands
|
|
21
|
+
old_commands = commands.queue[:default]
|
|
22
|
+
commands.empty
|
|
20
23
|
invoke :remote_environment
|
|
24
|
+
commands.queue[:default] += old_commands
|
|
21
25
|
commands.run(:remote)
|
|
22
26
|
end
|
|
23
27
|
end
|
data/tasks/mina/deploy.rb
CHANGED
|
@@ -4,7 +4,7 @@ set :releases_path, -> { "#{fetch(:deploy_to)}/releases" }
|
|
|
4
4
|
set :shared_path, -> { "#{fetch(:deploy_to)}/shared" }
|
|
5
5
|
set :current_path, -> { "#{fetch(:deploy_to)}/current" }
|
|
6
6
|
set :lock_file, 'deploy.lock'
|
|
7
|
-
set :deploy_script, 'data/deploy.sh.erb'
|
|
7
|
+
set :deploy_script, Mina.root_path('data/deploy.sh.erb')
|
|
8
8
|
set :keep_releases, 5
|
|
9
9
|
set :version_scheme, :sequence
|
|
10
10
|
set :execution_mode, :pretty
|
|
@@ -21,6 +21,14 @@ namespace :deploy do
|
|
|
21
21
|
comment %{Symlinking shared paths}
|
|
22
22
|
|
|
23
23
|
fetch(:shared_dirs, []).each do |linked_dir|
|
|
24
|
+
command %{
|
|
25
|
+
if [ ! -d "#{fetch(:shared_path)}/#{linked_dir}" ]; then
|
|
26
|
+
echo "! ERROR: not set up."
|
|
27
|
+
echo "The directory '#{fetch(:shared_path)}/#{linked_dir}' does not exist on the server"
|
|
28
|
+
echo "You may need to run 'mina setup' first"
|
|
29
|
+
exit 18
|
|
30
|
+
fi
|
|
31
|
+
}
|
|
24
32
|
command %{mkdir -p #{File.dirname("./#{linked_dir}")}}
|
|
25
33
|
command %{rm -rf "./#{linked_dir}"}
|
|
26
34
|
command %{ln -s "#{fetch(:shared_path)}/#{linked_dir}" "./#{linked_dir}"}
|
data/tasks/mina/git.rb
CHANGED
|
@@ -27,7 +27,8 @@ namespace :git do
|
|
|
27
27
|
#{echo_cmd %[git clone "#{fetch(:deploy_to)}/scm" . --recursive --branch "#{fetch(:branch)}"]}
|
|
28
28
|
}, quiet: true
|
|
29
29
|
end
|
|
30
|
-
|
|
30
|
+
comment %{Updating submodules}
|
|
31
|
+
command %{git submodule update}
|
|
31
32
|
comment %{Using this git commit}
|
|
32
33
|
command %{git rev-parse HEAD > .mina_git_revision}
|
|
33
34
|
command %{git --no-pager log --format="%aN (%h):%n> %s" -n 1}
|
|
@@ -45,7 +46,7 @@ namespace :git do
|
|
|
45
46
|
desc 'Ensures local repository is pushed to remote'
|
|
46
47
|
task :ensure_pushed do
|
|
47
48
|
run :local do
|
|
48
|
-
comment %{Ensuring
|
|
49
|
+
comment %{Ensuring everything is pushed to git}
|
|
49
50
|
command %{
|
|
50
51
|
if [ $(git log #{fetch(:remote)}/#{fetch(:branch)}..#{fetch(:branch)} | wc -l) -ne 0 ]; then
|
|
51
52
|
echo "! #{fetch(:git_not_pushed_message)}"
|
data/tasks/mina/install.rb
CHANGED
|
@@ -9,6 +9,13 @@ task :init do
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
outfile = './config/deploy.rb'
|
|
12
|
+
|
|
13
|
+
if File.exists?(outfile)
|
|
14
|
+
print 'deploy.rb already exists, do you want to overwrite it? (y/n) '
|
|
15
|
+
|
|
16
|
+
exit(8) if $stdin.readline.chomp.downcase != 'y'
|
|
17
|
+
end
|
|
18
|
+
|
|
12
19
|
require 'fileutils'
|
|
13
20
|
FileUtils.mkdir_p './config'
|
|
14
21
|
FileUtils.cp Mina.root_path('data/deploy.rb'), outfile
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mina
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stjepan Hadjić
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-08-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -117,6 +117,7 @@ extensions: []
|
|
|
117
117
|
extra_rdoc_files: []
|
|
118
118
|
files:
|
|
119
119
|
- ".codeclimate.yml"
|
|
120
|
+
- ".github/workflows/ci.yml"
|
|
120
121
|
- ".github_changelog_generator"
|
|
121
122
|
- ".gitignore"
|
|
122
123
|
- ".rspec"
|
|
@@ -214,7 +215,7 @@ homepage: https://github.com/mina-deploy/mina
|
|
|
214
215
|
licenses:
|
|
215
216
|
- MIT
|
|
216
217
|
metadata: {}
|
|
217
|
-
post_install_message:
|
|
218
|
+
post_install_message:
|
|
218
219
|
rdoc_options: []
|
|
219
220
|
require_paths:
|
|
220
221
|
- lib
|
|
@@ -230,9 +231,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
230
231
|
- !ruby/object:Gem::Version
|
|
231
232
|
version: '0'
|
|
232
233
|
requirements: []
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
signing_key:
|
|
234
|
+
rubygems_version: 3.2.3
|
|
235
|
+
signing_key:
|
|
236
236
|
specification_version: 4
|
|
237
237
|
summary: Blazing fast application deployment tool.
|
|
238
238
|
test_files: []
|