136 Commits

Author SHA1 Message Date
Jeffrey Cafferata
a38a01615e
Update GIT remote origin (#2520)
Changed the way the GIT remote URL is fetched from the config.
2021-04-22 19:14:09 +02:00
Anton Medvedev
da8bb1adff Fix deploy:update_code
Now default target is HEAD, also better at switching repository url.
2021-04-18 13:54:31 +02:00
Loris Leiva
a313326911
Fix ACL error message (#2501)
* Fix ACL error message

* Update CHANGELOG.md
2021-04-11 16:45:55 +02:00
Loris Leiva
7627f9ba43
Add and use new release_or_current_path (#2486)
* Add release_or_current_path option

* Use new path in platform-specific recipes

* Update CHANGELOG.md
2021-04-03 15:05:45 +03:00
Anton Medvedev
e7a27dff7e Refactor push task 2021-03-16 22:08:27 +01:00
Anton Medvedev
696893e7e2 Return cleanup_use_sudo 2021-03-15 22:12:13 +01:00
Anton Medvedev
19ce13a49b Fix revision saving on macos 2021-03-15 21:53:46 +01:00
Anton Medvedev
a200c1f9b0
Refactor deploy:update_code (#2461) 2021-03-15 01:35:06 +03:00
Dennis Smink
27c7b6182c
Check (shared) file exists (#2393)
* Check (shared) file exists
* Update CHANGELOG.md
2021-03-05 12:51:00 +01:00
lukepass
367c9bf723
Local composer should take precedence over global composer (#2371)
Co-authored-by: Luca Passini <l.passini@melazeta.com>
2021-01-13 13:26:35 +03:00
Ash Davies
da432e0139
Warning message sentence correction (#2361)
Corrected warning message to read a little better.
2020-12-24 15:55:11 +03:00
Anton Medvedev
2a12046528 Remove composer_version option 2020-12-18 20:13:28 +01:00
Pascal Hubrecht
6d357e94b6
Safety to avoid modifying files outside deploy_path (#2284)
* Safety to avoid modifying files outside deploy_path

Using writable_dirs with writable_use_sudo can lead to a disaster on a server (example using /var/log instead of var/log as writable dir).

* Update writable.php

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update writable.php

* trailing slash

* docgen

* throw exception if absolute path in writable dirs
2020-12-12 20:21:48 +01:00
Anton Medvedev
e6b491b4ad Fix phpstan error 2020-11-15 23:52:48 +01:00
Anton Medvedev
c7542ec048 Update doc 2020-11-11 10:10:57 +01:00
Mikael Peigney
96dfc6cff6
Allow changing Composer channel (#2265)
Composer installer can now take an argument to select which version channel to use: https://github.com/composer/getcomposer.org/pull/156/files
This allows for exemple to stay on major version 1 without specifying a specific Composer version
2020-11-11 12:09:50 +03:00
Anton Medvedev
c747a5945b Rename git_target to target 2020-10-28 00:12:18 +01:00
Anton Medvedev
ff110c987d
Refactor recipes (#2224) 2020-10-25 18:00:05 +03:00
Anton Medvedev
2feb5c1247 Update docs 2020-10-25 14:20:03 +01:00
Joey Kaan
ee3746690b
Add composer_version to choose which composer version to install (#2222)
Co-authored-by: Joey Kaan <joeyk@spotify.com>
2020-10-25 13:01:34 +01:00
Justinas Urbanavicius
a6edb7f977
fixed issue #2209 (#2211)
* fixed issue #2209

Copy shared files and folder should be verbose only when deployer is run with Very verbose output

* updated CHANGELOG.md

* changed to -vvv

* changes sprintf to interpolation
2020-10-22 13:56:20 +02:00
Andrey Helldar
9f89525548
[composer 3] Removed deprecated option "--no-suggest" (#2212)
* [composer 3] deprecated option "--no-suggest"

* Updated CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: Anton Medvedev <anton@medv.io>
2020-10-21 23:53:25 +02:00
Anton Medvedev
8e72449246 Add push task 2020-10-11 00:08:50 +02:00
Anton Medvedev
e227623ba6 Fix deploy:check_remote task 2020-10-10 21:58:06 +02:00
Anton Medvedev
6bea23bf02 Fix status command if release not a git repo 2020-10-10 20:38:32 +02:00
Anton Medvedev
f429c750bc Keep release on rollback and mark it as bad 2020-10-09 23:11:30 +02:00
Anton Medvedev
84c9f6bb58 Add status command 2020-10-09 02:24:09 +02:00
Anton Medvedev
c88ebe275f Allow to change current_path 2020-10-09 01:35:42 +02:00
Anton Medvedev
112601294c Fix shared dir with trailing slash 2020-10-09 01:14:16 +02:00
Anton Medvedev
71afcdcc3a Store composer.phar in .dep 2020-10-08 01:19:39 +02:00
Anton Medvedev
a5e00c686a Copy shared dir only if there is no dir 2020-10-08 00:42:44 +02:00
Anton Medvedev
dafad94e8e Better error message for ACL 2020-10-08 00:41:18 +02:00
Anton Medvedev
744c56fc09 Refactor deploy:writable 2020-10-07 23:55:41 +02:00
Anton Medvedev
47a193f9af
Add docgen 2020-10-02 01:11:13 +03:00
Sacharski Bartłomiej
514d997c15
[issue-2170] Use on(localhost(), ...) instead of runLocally in check_remote.php (#2175)
Reworked the `deploy:check_remote` step, to use the `on(localhost(), ...)`,
instead of relying on `runLocally`.

This has been changed, to make sure that the all functions that
are being executed and are related to "local" part of the logic,
are ran on the local host.

Previously in `runLocally(sprintf("%s ls-remote $opt $repository $ref", get('bin/git')));`
the `get('bin/git')` would've been executed on the remote host, which
could have resulted in an unexpected behaviour.

By closing all of the instructions, in the closure that is executed
by the `on()` function, we are sure that the context is set to the
right host.
2020-10-01 20:32:51 +03:00
Andreas Möller
96c739bd5b
Enhancement: Add deploy:is-unlocked (#2152) 2020-09-03 16:17:52 +03:00
Anton Medvedev
8293eb931e wip 2020-07-26 22:35:08 +03:00
Anton Medvedev
29a643b623 v7 2020-05-16 18:02:17 +03:00
MoogyG
944f9bd582
Update update_code.php (#1958) 2020-04-20 23:56:31 +03:00
Beno!t POLASZEK
a8dabf03ee
Keep consistency with deployer executable naming (#2011) 2020-03-06 12:49:07 +03:00
Jono Menz
c0bf1d7913
Fix check_remote task revision resolution (#1995)
* Support branch & tag if specified
* Support shortened commit hashes
* Skip on first deployment
* Get true current ref from git

Fixes #1994
2020-02-01 22:15:53 +03:00
Vladimir Pak
377adf977a
Speedup deploy:clear_paths (#1992)
* Update clear_paths.php

one run much faster than several

* Update CHANGELOG.md
2020-01-30 12:08:11 +03:00
Jono Menz
b7a728b7b3
Fixes for check_remote task and SS recipe (#1991)
* Fix check_remote task

* Check remote head contents locally
* Ensure .dep/HEAD file is available so error isn’t thrown
* Document task usage

Fixes #1990

* Fix Silverstripe recipe

* Additionally check shared directory for assets since this directory is commonly excluded from project git repos
* Ensure shared_assets returns a non-null value so the release folder can’t get accidentally deleted

Fixes #1989

* Update CHANGELOG.md

* Clarified contribution instructions

* Update issue templates

Added a bug report template
2020-01-29 11:13:11 +03:00
u_mulder
861f1a34bb Add minor fixes for recipes steps (#1945) 2019-10-26 14:30:22 +03:00
Anton Medvedev
85aae9fd68 Add deploy:check_remote task 2019-08-12 21:01:32 +03:00
Anton Medvedev
4190e28fcb
Revert "Handle asterisk wildcard in shared files (#1895)" (#1897)
This reverts commit 6dd0a2c1f7eda33f9b5dbde287ffeda889e025de.
2019-08-08 11:26:20 +03:00
Vytautas Koryzna
6dd0a2c1f7 Handle asterisk wildcard in shared files (#1895) 2019-08-07 11:02:08 +03:00
Ahmad Mayahi
bb4d41c896 Add check_remote_head option to avoid unnecessary new releases by che… (#1759)
* Add check_remote_head option to avoid unnecessary new releases by checking the remote git HEAD without cloning the repo.

* Add check_remote_head into the CHANGELOG

* Add the pull request link to CHANGELOG

* Update CHANGELOG.md

Removed extra spaces: https://github.com/deployphp/deployer/pull/1759

* Fix changelog. Improve check_remote_head

* Use GrasefulSutdown exception instead of exit(0).

* Change bash if statement in check_remote_head.

* Remove redundant code.

* Replace if statement with test.
2019-08-06 21:52:41 +03:00
Andrey Helldar
2ef394e125 Fixed bug "Can't detect http user name." (#1876)
* Fixed bug "Can't detect http user name."

See:
* https://github.com/deployphp/deployer/issues/1778#issuecomment-507228046
* #1805

* Update writable.php
2019-07-01 15:37:15 +03:00
Kostadin A
82a00248fb Prevent dir creation when it is existing (#1858)
If "shared" directory is already existing just do not call mkdir, to prevent pointless update during processing of the "shared" files.
2019-06-07 06:17:16 +03:00