Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

capistrano-git-copy

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

capistrano-git-copy

  • 1.5.6
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Capistrano::GitCopy

Creates a tar archive locally from the git repository and uploads it to the remote server.

Setup

Add the library to your Gemfile:

group :development do
  gem 'capistrano-git-copy', require: false
end

And require it in your Capfile:

require 'capistrano/git_copy'
install_plugin Capistrano::GitCopy::SCM

Submodules

By default, it includes all submodules into the deployment package. However, if they are not needed in a particular deployment, you can disable them with a configuration option:

set :with_submodules, false

Besides using export-ignore in .gitattributes it's possible exclude files and directories by adding them to git_excludes:

append :git_excludes, 'config/database.yml.example', 'test', 'rspec'

git-archive-all does not support .gitattributes yet - please set with_submodules to false to make e.g. export-ignore work

Subdirectories

It is also possible to deploy only a subdirectory to the remote server:

set :upload_path, 'dist'

This makes it possible to compile or build something locally and only upload the result

namespace :deploy do
  before :'git_copy:create_release', :'deploy:build_app'

  task :build_app do
    run_locally do
      within(fetch(:git_copy_plugin).repo_cache_path) do
        execute :npm, :install
        execute :npm, :run, :'build-dist'
      end
    end
  end
end

Notes

  • Uses git-archive-all for bundling repositories.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

FAQs

Package last updated on 10 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc