Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Drupal
drupalizer
Commits
bd7ddfde
Commit
bd7ddfde
authored
Mar 16, 2016
by
Emmanuel Milou
Browse files
Add release task
parent
87c60a1e
Changes
1
Show whitespace changes
Inline
Side-by-side
fabfile.py
View file @
bd7ddfde
...
@@ -26,6 +26,9 @@ from fabric.contrib.console import confirm
...
@@ -26,6 +26,9 @@ from fabric.contrib.console import confirm
# Import socket to find the localhost IP address
# Import socket to find the localhost IP address
import
socket
import
socket
# Import datetime
from
datetime
import
datetime
# Import default variables
# Import default variables
from
default_vars
import
*
from
default_vars
import
*
...
@@ -445,6 +448,19 @@ def git_clone_profile(role='local'):
...
@@ -445,6 +448,19 @@ def git_clone_profile(role='local'):
print
(
green
(
'git clone for project {}'
.
format
(
profile
)))
print
(
green
(
'git clone for project {}'
.
format
(
profile
)))
fab_run
(
role
,
'git clone {} {}'
.
format
(
PROFILE
[
profile
],
profile
))
fab_run
(
role
,
'git clone {} {}'
.
format
(
PROFILE
[
profile
],
profile
))
@
task
(
alias
=
'rel'
)
@
roles
(
'local'
)
def
release
(
role
=
'local'
):
"""
Archive the platform for release or deployment
"""
set_env
(
role
)
with
fab_cd
(
role
,
DRUPAL_ROOT
):
PLATFORMNAME
=
'{}-{}.tar.gz'
.
format
(
PROJECT_NAME
,
datetime
.
now
().
strftime
(
'%Y%m%d_%H%M%S'
))
print
(
green
(
'Cleaning previous archives'
))
fab_run
(
role
,
'rm -f {}/*.tar.gz'
.
format
(
BUILDDIR
))
print
(
green
(
'Archiving the platform'
))
fab_run
(
role
,
'tar -czf {}/{} {}'
.
format
(
BUILDDIR
,
PLATFORMNAME
,
DRUPAL_ROOT
))
# Task to manage Drupal site generally in the docker container#
# Task to manage Drupal site generally in the docker container#
###############################################################
###############################################################
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment