-
Notifications
You must be signed in to change notification settings - Fork 492
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
Simple mina git:clone
fails on step "Using git branch 'master'"
#200
Comments
The problem seems to be at line 48 of https://github.com/mina-deploy/mina/blob/master/lib%2Fmina%2Fgit.rb : clone = if commit?
%[
echo "-----> Using git commit '#{commit}'" &&
#{echo_cmd %[git clone "#{repository!}" . --recursive]} &&
#{echo_cmd %[git checkout -b current_release "#{commit}" --force]} &&
]
else
%{
if [ ! -d "#{deploy_to}/scm/objects" ]; then
echo "-----> Cloning the Git repository"
#{echo_cmd %[git clone "#{repository!}" "#{deploy_to}/scm" --bare]}
else
echo "-----> Fetching new git commits"
#{echo_cmd %[(cd "#{deploy_to}/scm" && git fetch "#{repository!}" "#{branch}:#{branch}" --force)]}
fi &&
echo "-----> Using git branch '#{branch}'" &&
####### Line 48 is next #######
#{echo_cmd %[git clone "#{deploy_to}/scm" . --recursive --branch "#{branch}"]} &&
}
end |
I assume it needs to |
hello? |
duplicate of #190 |
I’m seeing the same issue. Any news? |
Hm, I'm a little puzzled here. echo "-----> Creating a temporary build path"
touch deploy.lock &&
mkdir -p "$build_path" &&
cd "$build_path" &&
(
... your git clone commands here
) Just tested out the latest release and this seems to still work properly. Can you do |
Thanks for helping us out @rstacruz! These are what I believe are the relevant lines get when I do # Bootstrap script (in deployer)
(
echo "-----> Creating a temporary build path"
touch "deploy.lock" &&
mkdir -p "$build_path" &&
cd "$build_path" &&
(
(
if [ ! -d "webapps/paulrobertlloyd_v3/scm/objects" ]; then
echo "-----> Cloning the Git repository"
git clone "git://github.com/paulrobertlloyd/paulrobertlloyd.com.git" "webapps/paulrobertlloyd_v3/scm" --bare
else
echo "-----> Fetching new git commits"
(cd "webapps/paulrobertlloyd_v3/scm" && git fetch "git://github.com/paulrobertlloyd/paulrobertlloyd.com.git" "master:master" --force)
fi &&
echo "-----> Using git branch 'master'" &&
git clone "webapps/paulrobertlloyd_v3/scm" . --recursive --branch "master" &&
echo "-----> Using this git commit" &&
echo &&
git --no-pager log --format="%aN (%h):%n> %s" -n 1 &&
rm -rf .git &&
echo
) && (
echo "-----> Symlinking shared paths"
mkdir -p "./config" &&
mkdir -p "." &&
rm -rf "./config/database.yml" &&
ln -s "webapps/paulrobertlloyd_v3/shared/config/database.yml" "./config/database.yml" &&
rm -rf "./log" &&
ln -s "webapps/paulrobertlloyd_v3/shared/log" "./log"
)
)
) && That Also, adding |
the On Sun, Aug 17, 2014 at 8:18 PM, Paul Robert Lloyd <notifications@github.com
Brandon Zylstra |
Seems to be fixed in future versions |
The same results are obtained by running the same commands on the server, so it looks like Mina is not sending the correct commands in the first place. For instance, when it runs
git clone "/var/www/vhosts/test.insite.spartannash-dev.com/scm" . --recursive --branch "master"
,.
is the main:deploy_to
directory. That doesn't sound right—shouldn't it be specifying a different directory? (Certainly Git thinks it shouldn't be cloning into that location!)My deploy.rb file contains
The text was updated successfully, but these errors were encountered: