Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
banners-with-skip
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
0832ca59
authored
2017-11-29 12:21:57 -0500
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
deploy
1 parent
933476eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
18 deletions
deploy.php
deploy.php
View file @
0832ca5
<?php
// Set Variables
$LOCAL_ROOT
=
"/var/www/html/"
;
$LOCAL_REPO_NAME
=
"banners-with-skip"
;
$LOCAL_REPO
=
"
{
$LOCAL_ROOT
}
/
{
$LOCAL_REPO_NAME
}
"
;
$REMOTE_REPO
=
"git@git.gotenzing.com:jeffmbalicki/banners-with-skip.git"
;
$BRANCH
=
"deploy"
;
if
(
file_exists
(
$LOCAL_REPO
)
)
{
// If there is already a repo, just run a git pull to grab the latest changes
shell_exec
(
"cd
{
$LOCAL_REPO
}
&& sudo git pull"
);
shell_exec
(
"sudo git pull"
);
echo
'done'
;
die
(
"done "
.
mktime
());
}
else
{
// If the repo does not exist, then clone it into the parent directory
shell_exec
(
"cd
{
$LOCAL_ROOT
}
&& sudo git clone
{
$REMOTE_REPO
}
"
);
die
(
"done "
.
mktime
());
}
?>
...
...
Please
register
or
sign in
to post a comment