Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mahara-scripts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
mahara
mahara-scripts
Commits
c3d1d63e
Commit
c3d1d63e
authored
Sep 29, 2015
by
Aaron Wells
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing a few problems in the PHP version
parent
2072de0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
release.sh
release.sh
+12
-10
No files found.
release.sh
View file @
c3d1d63e
...
...
@@ -171,35 +171,36 @@ if ($OLDVERSION >= 2015091700) {
}
# Package up the release
$PACKAGEDIR
=
$BUILDDIR
.
'/
mahara-'
.
$VERSION
;
echo
"Package directory:
$PACKAGEDIR
\n
"
;
passthru
(
"cp -r
$BUILDDIR
/mahara
$PACKAGEDIR
"
)
;
chdir
(
"
$PACKAGEDIR
"
)
;
$PACKAGEDIR
=
'
mahara-'
.
$VERSION
;
echo
"Package directory:
$
BUILDDIR
/
$
PACKAGEDIR
\n
"
;
passthru
(
"cp -r
$BUILDDIR
/mahara
$
BUILDDIR
/
$
PACKAGEDIR
"
)
;
chdir
(
"
$
BUILDDIR
/
$
PACKAGEDIR
"
)
;
# Delete everything that shouldn't be included
if
(
getcwd
()
!=
"
$PACKAGEDIR
"
||
$PACKAGEDIR
==
''
)
{
if
(
getcwd
()
!=
"
$
BUILDDIR
/
$
PACKAGEDIR
"
||
$PACKAGEDIR
==
''
)
{
echo
"Couldn't cd into the right directory"
;
exit
(
1
)
;
}
passthru
(
'find . -type d -name ".git" -execdir rm -Rf {} \; 2> /dev/null'
)
;
passthru
(
'find . -type f -name ".gitignore" -execdir rm -Rf {} \; 2> /dev/null'
)
;
passthru
(
'find . -type d -name "node_modules" -execdir rm -Rf {} \; 2> /dev/null'
)
;
passthru
(
'find . -type f -name "gulpfile.js" -execdir rm -Rf {} \; 2> /dev/null'
)
;
passthru
(
'find htdocs/theme -type d -name "sass" -execdir rm -Rf {} \; 2> /dev/null'
)
;
passthru
(
"rm -Rf test"
)
;
passthru
(
"rm -Rf .gitattributes"
)
;
passthru
(
"rm -Rf .gitignore"
)
;
passthru
(
"rm -Rf Makefile"
)
;
passthru
(
"rm -Rf phpunit.xml"
)
;
passthru
(
"rm -Rf external"
)
;
passthru
(
"rm -Rf package.json"
)
;
passthru
(
"rm -Rf ChangeLog.back"
)
;
# Get the location for all phpunit directories
$phpunitdirs
=
explode
(
"
\n
"
,
`
find
.
-type
d
-name
'phpunit'
-path
'*/tests/phpunit'
`
)
;
$phpunitdirs
=
explode
(
"
\n
"
,
`
find
.
-type
d
-name
'phpunit'
-path
'*/tests/phpunit'
2> /dev/null
`
)
;
foreach
(
$phpunitdirs
as
$dir
)
{
$parentdir
=
dirname
(
$dir
)
;
# Determine whether the parent directory contains anything other than
# phpunit. If not, remove the whole parent directory.
$siblings
=
explode
(
"
\n
"
,
`
find
"
$parentdir
"
-maxdepth
1
-mindepth
1
`
)
;
$siblings
=
explode
(
"
\n
"
,
`
find
"
$parentdir
"
-maxdepth
1
-mindepth
1
2> /dev/null
`
)
;
if
(
count
(
$siblings
)
==
1
)
{
passthru
(
"rm -Rf
$parentdir
"
)
;
}
...
...
@@ -215,7 +216,7 @@ passthru("tar c $PACKAGEDIR | gzip -9 > ${CURRENTDIR}/mahara-${RELEASE}.tar.gz")
echo
"Creating mahara-
${
RELEASE
}
.tar.bz2
\n
"
;
passthru
(
"tar c
$PACKAGEDIR
| bzip2 -9 >
${
CURRENTDIR
}
/mahara-
${
RELEASE
}
.tar.bz2"
)
;
echo
"Creating mahara-
${
RELEASE
}
.zip
\n
"
;
passthru
(
"zip
${
CURRENTDIR
}
/mahara-
${
RELEASE
}
.zip
$PACKAGEDIR
"
)
;
passthru
(
"zip
-rq
${
CURRENTDIR
}
/mahara-
${
RELEASE
}
.zip
$PACKAGEDIR
"
)
;
# Save git changelog
...
...
@@ -232,12 +233,13 @@ else {
# Prepare release notes
// TODO: Replace this with a simple find/replace, to remove the m4 dependency
$TMP_M4_FILE
=
'/tmp/mahara-releasnotes.m4.tmp'
;
$TMP_M4_FILE
=
'/tmp/mahara-releas
e
notes.m4.tmp'
;
$m4script
=
<<<
STRING
changecom
define
(
\\
`
__RELEASE__
',\\`${RELEASE}'
)
dnl
define
(
\\
`
__OLDRELEASE__
',\\`${OLDRELEASE}'
)
dnl
define
(
\\
`
__MAJOR__
',\\`${MAJOR}'
)
dnl
STRING
;
file_put_contents
(
$TMP_M4_FILE
,
$m4script
)
;
if
(
$releasecandidate
)
{
...
...
Write
Preview
Markdown
is supported
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