Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only load git library when needed. #1753

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Release Notes and Change Log
============================

1.12.1 (???)
^^^^^^^^^^^^^^^^^^^^^^^^^

* gem: Fix error "git: not found (Git::GitExecuteError)". Now loads `git` library only when using git features.

1.12.0 (January 19, 2021)
^^^^^^^^^^^^^^^^^^^^^^^^^

Expand All @@ -17,6 +22,7 @@ Release Notes and Change Log
* rpm: Add support for `xzmt` compression (multithreaded xz compressor) to help when creating very large packages (several gigabytes). (`#1447`_, `#1419`_; amnobc)
* rpm: Add `--rpm-macro-expansion` flag to enable macro expansion in scripts during rpmbuild. See https://rpm.org/user_doc/scriptlet_expansion.html for more details. (`#1642`_; juliantrzeciak)
* deb: use correct control.tar filename (`#1668`_; Mike Perham)
* gem: Add flag --gem-git-repo to allow a gem source to be a git repository url. (`#1558`_; liger1978)

1.11.0 (January 30, 2019)
^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion lib/fpm/package/gem.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
require "fileutils"
require "fpm/util"
require "yaml"
require "git"

# A rubygems package.
#
Expand Down Expand Up @@ -105,6 +104,7 @@ def download(gem_name, gem_version=nil)
FileUtils.mkdir(download_dir) unless File.directory?(download_dir)

if attributes[:gem_git_repo]
require "git"
logger.debug("Git cloning in directory #{download_dir}")
g = Git.clone(attributes[:gem_git_repo],gem_name,:path => download_dir)
if attributes[:gem_git_branch]
Expand Down