-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…e os by default
- Loading branch information
Showing
13 changed files
with
285 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,43 @@ | ||
#! /bin/sh | ||
echo "running $0 $@" | ||
|
||
yum -y install curl epel-release # epel-release necessary to install nodejs/npm on CentOS 5, and no harm otherwise | ||
curl --silent --location https://rpm.nodesource.com/setup | bash - | ||
yum -y install gcc-c++ make nodejs | ||
|
||
if [ hash bower 2> /dev/null ]; then | ||
echo 'Bower is already installed' | ||
else | ||
npm -q install -g bower | ||
fi | ||
# Defaults | ||
install_nodejs=true | ||
install_ruby=true | ||
|
||
if [ hash gulp 2> /dev/null ]; then | ||
echo 'Gulp is already installed' | ||
else | ||
npm -q install -g gulp | ||
fi | ||
# Load the normalized project properties. | ||
source /tmp/$1.project.properties | ||
|
||
if [ install_nodejs == true ]; then | ||
|
||
yum -y install curl epel-release # epel-release necessary to install nodejs/npm on CentOS 5, and no harm otherwise | ||
curl --silent --location https://rpm.nodesource.com/setup | bash - | ||
yum -y install gcc-c++ make nodejs | ||
|
||
if [ hash bower 2> /dev/null ]; then | ||
echo 'Bower is already installed' | ||
else | ||
npm -q install -g bower | ||
fi | ||
|
||
if [ hash gulp 2> /dev/null ]; then | ||
echo 'Gulp is already installed' | ||
else | ||
npm -q install -g gulp | ||
fi | ||
|
||
if [ hash forever 2> /dev/null ]; then | ||
echo 'Forever is already installed' | ||
else | ||
npm -q install -g forever | ||
fi | ||
|
||
if [ hash forever 2> /dev/null ]; then | ||
echo 'Forever is already installed' | ||
else | ||
npm -q install -g forever | ||
fi | ||
|
||
if [ hash ruby 2> /dev/null ]; then | ||
echo 'Ruby is already installed' | ||
else | ||
yum -y install ruby | ||
if [ install_ruby == true ]; then | ||
if [ hash ruby 2> /dev/null ]; then | ||
echo 'Ruby is already installed' | ||
else | ||
yum -y install ruby | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,47 @@ | ||
#! /bin/sh | ||
echo "running $0 $@" | ||
|
||
# Install git | ||
yum -y install git | ||
# Defaults | ||
install_git=true | ||
install_git_project=true | ||
|
||
# create a local git repo | ||
mkdir -p /space/projects/$1.git | ||
# Load the normalized project properties. | ||
source /tmp/$1.project.properties | ||
|
||
# initialize the git repo | ||
cd /space/projects/$1.git | ||
if [ ! -f HEAD ]; then | ||
git --bare init | ||
fi | ||
if [ ! -f hooks/post-receive ]; then | ||
printf "#!/bin/sh\nin=\$(cat)\nbranch=\${in##*/}\nGIT_WORK_TREE=/space/projects/$1.live git checkout -f \$branch\nchown -R :sshuser /space/projects/$1.live\nchmod -R g+rw /space/projects/$1.live\n" > hooks/post-receive | ||
chmod 755 hooks/post-receive | ||
if [ install_git == true ]; then | ||
# Install git | ||
yum -y install git | ||
fi | ||
|
||
# create a project deploy dir | ||
mkdir -p /space/projects/$1.live | ||
if [ install_git_project == true ]; then | ||
# create a local git repo | ||
mkdir -p /space/projects/$1.git | ||
|
||
# initialize the git repo | ||
cd /space/projects/$1.git | ||
if [ ! -f HEAD ]; then | ||
git --bare init | ||
fi | ||
if [ ! -f hooks/post-receive ]; then | ||
printf "#!/bin/sh\nin=\$(cat)\nbranch=\${in##*/}\nGIT_WORK_TREE=/space/projects/$1.live git checkout -f \$branch\nchown -R :sshuser /space/projects/$1.live\nchmod -R g+rw /space/projects/$1.live\n" > hooks/post-receive | ||
chmod 755 hooks/post-receive | ||
fi | ||
|
||
# create a project deploy dir | ||
mkdir -p /space/projects/$1.live | ||
|
||
# change permissions to allow remote deployment | ||
cd /space/projects | ||
if [ -d /vagrant ]; then | ||
chown -R $1:sshuser $1.git | ||
chown -R $1:sshuser $1.live | ||
else | ||
# creation of users is limited on demo servers | ||
chown -R $USER:sshuser $1.git | ||
chown -R $USER:sshuser $1.live | ||
# change permissions to allow remote deployment | ||
cd /space/projects | ||
if [ -d /vagrant ]; then | ||
chown -R $1:sshuser $1.git | ||
chown -R $1:sshuser $1.live | ||
else | ||
# creation of users is limited on demo servers | ||
chown -R $USER:sshuser $1.git | ||
chown -R $USER:sshuser $1.live | ||
fi | ||
chmod -R g+rw $1.git | ||
chmod -R g+rw $1.live | ||
chmod g+s $1.git | ||
chmod g+s $1.live | ||
fi | ||
chmod -R g+rw $1.git | ||
chmod -R g+rw $1.live | ||
chmod g+s $1.git | ||
chmod g+s $1.live |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.