Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simayosi/capistrano-scm-local_git_upload
Capistrano SCM Plugin for local git clone and upload
https://github.com/simayosi/capistrano-scm-local_git_upload
capistrano-plugin capistrano3 ruby
Last synced: 21 days ago
JSON representation
Capistrano SCM Plugin for local git clone and upload
- Host: GitHub
- URL: https://github.com/simayosi/capistrano-scm-local_git_upload
- Owner: simayosi
- License: mit
- Created: 2022-03-16T11:32:23.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-16T11:33:48.000Z (almost 3 years ago)
- Last Synced: 2024-11-23T06:12:12.950Z (about 1 month ago)
- Topics: capistrano-plugin, capistrano3, ruby
- Language: Ruby
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Capistrano::Scm::LocalGitUpload
[![Gem Version](https://badge.fury.io/rb/capistrano-scm-local_git_upload.svg)](https://badge.fury.io/rb/capistrano-scm-local_git_upload)
![Ruby](https://github.com/simayosi/capistrano-scm-local_git_upload/actions/workflows/test.yml/badge.svg)Capistrano SCM Plugin for local git clone and upload.
This plugin firstly clones the git repository to the local host
and thereafter uploads files on the local host to the remote servers.## Installation
Add this line to your application's Gemfile:
```ruby
gem 'capistrano-scm-local_git_upload'
```
And execute:
```bash
$ bundle install
```Add to Capfile:
```ruby
require "capistrano/scm/local_git_upload"
install_plugin Capistrano::SCM::LocalGitUpload
```## Usage
The git repository is cloned
to `work_path` (default: `work`) on the local host
before `deploy:started`.Then,
files under `upload_path` (default: `upload`) on the local host
are uploaded to `release_path` on the remote servers
after `deploy:new_release_path`.Therefore, you need to prepare `upload_path` using `work_path` files
until `deploy:new_release_path`.This is a simple copy example from `work/public` to `upload/public`.
```ruby
namespace :sample_app do
task :copy_to_upload do
run_locally do
execute :cp, '-pr', work_path.join('public'), upload_path
end
end
before 'deploy:new_release_path', 'sample_app:copy_to_upload'
end
```## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).