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
1e7baa90
Commit
1e7baa90
authored
Dec 01, 2015
by
Aaron Wells
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fixes to the new release script
parent
f46580f6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
16 deletions
+22
-16
release.php
release.php
+22
-13
releasenotes.stable.template
releasenotes.stable.template
+0
-3
No files found.
release.php
View file @
1e7baa90
...
...
@@ -13,32 +13,37 @@ define('CLI', 1);
# the changelog.
#
$usage
=
<<<STRING
Usage is ${argv[0]} [version] [branch] [<changesetnumber>...]
e.g. ${argv[0]} 16.04.3 16.04_STABLE
e.g. ${argv[0]} 15.10.1 15.10_STABLE 5793 5795
STRING;
if
(
count
(
$argv
)
<
3
)
{
echo
"Usage is ${argv[0]} [version] [branch] [<changesetnumber>...]
\n
"
;
echo
"e.g. ${argv[0]} 16.04.3 16.04_STABLE
\n
"
;
echo
"e.g. ${argv[0]} 15.10.1 15.10_STABLE 5793 5795
\n
"
;
echo
$usage
;
exit
(
1
);
}
# Check for git gpg lp-project-upload
if
(
!@
is_executable
(
'/usr/bin/gpg'
))
{
echo
"You need to install gpg: apt-get install gnupg"
;
echo
"You need to install gpg: apt-get install gnupg
\n
"
;
exit
(
1
);
}
if
(
!@
is_executable
(
'/usr/bin/git'
))
{
echo
"You need to install git: apt-get install git-core"
;
echo
"You need to install git: apt-get install git-core
\n
"
;
exit
(
1
);
}
if
(
!@
is_executable
(
'/usr/bin/lp-project-upload'
))
{
echo
"You need to install lp-project-upload: apt-get install ubuntu-dev-tools (maverick or earlier) or lptools"
;
echo
"You need to install lp-project-upload: apt-get install ubuntu-dev-tools (maverick or earlier) or lptools
\n
"
;
exit
(
1
);
}
if
(
!@
is_executable
(
'/usr/bin/m4'
))
{
echo
"You need to install m4: apt-get install m4"
;
echo
"You need to install m4: apt-get install m4
\n
"
;
exit
(
1
);
}
...
...
@@ -46,7 +51,7 @@ $GIT_MAJOR = `git --version | cut -d' ' -f 3 | cut -d'.' -f 1`;
$GIT_MINOR
=
`git --version | cut -d' ' -f 3 | cut -d'.' -f 2`
;
if
(
$GIT_MAJOR
<
1
||
(
$GIT_MAJOR
==
1
&&
$GIT_MINOR
<
6
))
{
echo
"Your version of git is too old. Install git 1.6."
;
echo
"Your version of git is too old. Install git 1.6.
\n
"
;
exit
(
1
);
}
...
...
@@ -56,7 +61,8 @@ $VERSION=$argv[1];
$result
=
preg_match
(
'/([0-9]+\.[0-9]+)(\.|rc)([0-9]+)/i'
,
$VERSION
,
$matches
);
if
(
!
$result
)
{
echo
"Invalid version number. It must match the pattern
\"
15.04.1
\"
or
\"
15.04rc1
\"
."
;
echo
"Invalid version number. It must match the pattern
\"
15.04.1
\"
or
\"
15.04rc1
\"
.
\n
"
;
echo
$usage
;
exit
(
1
);
}
$MAJOR
=
$matches
[
1
];
...
...
@@ -193,7 +199,7 @@ passthru("git tag -s ${RELEASETAG} -m \"$RELEASE release\"");
# Build the css
if
(
$OLDVERSION
>=
2015091700
)
{
echo
"Building css...
\n
"
;
echo
`make css >> ../css.log 2>&1`
;
passthru
(
"make css >> ../css.log 2>&1"
)
;
if
(
!
file_exists
(
'htdocs/theme/raw/style/style.css'
))
{
echo
"CSS files did not build correctly! Check
$BUILDDIR
/css.log for details."
;
exit
(
1
);
...
...
@@ -264,14 +270,17 @@ else {
# Prepare release notes
// TODO: Replace this with a simple find/replace, to remove the m4 dependency
$TMP_M4_FILE
=
'/tmp/mahara-releasenotes.m4.tmp'
;
passthru
(
"sed 's/^/ * /g' ${CURRENTDIR}/changes.temp >> ${CURRENTDIR}/changes.noasterisks.temp"
);
$m4script
=
<<<STRING
changecom
define(\\`__RELEASE__',\\`${RELEASE}')dnl
define(\\`__OLDRELEASE__',\\`${OLDRELEASE}')dnl
define(\\`__MAJOR__',\\`${MAJOR}')dnl
define(`__RELEASE__',`${RELEASE}')dnl
define(`__OLDRELEASE__',`${OLDRELEASE}')dnl
define(`__MAJOR__',`${MAJOR}')dnl
define(`__CHANGES__',`include(`${CURRENTDIR}/changes.noasterisks.temp')')dnl
STRING;
file_put_contents
(
$TMP_M4_FILE
,
$m4script
);
if
(
$releasecandidate
)
{
$TEMPLATE
=
'releasenotes.rc.template'
;
}
...
...
releasenotes.stable.template
View file @
1e7baa90
...
...
@@ -10,6 +10,3 @@ upgrade, we encourage you to make a copy of your website and test the
upgrade on it first, to minimise the effect of any potential
unforeseen problems.
Changes from __OLDRELEASE__:
__CHANGES__
\ No newline at end of file
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