Commit f9bd2275 authored by Son Nguyen's avatar Son Nguyen

Add gitlab.com as a git repository source.

Add bzr launchpad-login command before communicate with Launchpad

Change-Id: I29cacebba13530dead2eb3328e882a580a8442dc
parent fc6625ec
mahara-scripts (1.28) unstable; urgency=low
* Add gitlab as a git repository source.
-- Son Nguyen <son.nguyen@catalyst.net.nz> Mon, 31 Aug 2015 07:15:34 +1300
mahara-scripts (1.27) unstable; urgency=low mahara-scripts (1.27) unstable; urgency=low
* Change mahara git repo protocol to HTTPs * Change mahara git repo protocol to HTTPs
......
...@@ -109,6 +109,7 @@ system "git fetch --quiet origin"; ...@@ -109,6 +109,7 @@ system "git fetch --quiet origin";
# For launchpad, all languages are in a single branch, so update the lot # For launchpad, all languages are in a single branch, so update the lot
system "bzr launchpad-login dev-mahara";
! -d $BZRDIR && system "bzr init-repo $BZRDIR"; ! -d $BZRDIR && system "bzr init-repo $BZRDIR";
my @branches = qw(1.7_STABLE 1.8_STABLE 1.9_STABLE 1.10_STABLE 15.04_STABLE master); my @branches = qw(1.7_STABLE 1.8_STABLE 1.9_STABLE 1.10_STABLE 15.04_STABLE master);
...@@ -146,7 +147,7 @@ foreach my $lang (@langkeys) { ...@@ -146,7 +147,7 @@ foreach my $lang (@langkeys) {
$repotype = 'launchpad'; $repotype = 'launchpad';
@branches = qw(1.7_STABLE 1.8_STABLE 1.9_STABLE 1.10_STABLE 15.04_STABLE master); @branches = qw(1.7_STABLE 1.8_STABLE 1.9_STABLE 1.10_STABLE 15.04_STABLE master);
} }
elsif ( $remote =~ m{^https://git\.mahara\.org} ) { elsif ( $remote =~ m{^https://git\.mahara\.org|^https://gitlab\.com} ) {
$repotype = 'git'; $repotype = 'git';
! -d "$gitlangdir" && system "git clone --quiet $remote $gitlangdir"; ! -d "$gitlangdir" && system "git clone --quiet $remote $gitlangdir";
chdir $gitlangdir; chdir $gitlangdir;
......
...@@ -38,11 +38,11 @@ fi ...@@ -38,11 +38,11 @@ fi
[ ! -d ${TARBALLS} ] && mkdir ${TARBALLS} [ ! -d ${TARBALLS} ] && mkdir ${TARBALLS}
# Lock the script to prevent running in parallel # Lock the script to prevent running in parallel
if [ ! mkdir ${DATA}/lock ]; then if ! mkdir ${DATA}/langpacks-lock; then
echo "The script is running" >&2 echo "The script is running" >&2
exit 0 exit 0
fi fi
env DATA=$DATA DOCROOT=$DOCROOT SCRIPTS=$SCRIPTS /usr/bin/perl ${SCRIPTS}/langpacks.pl env DATA=$DATA DOCROOT=$DOCROOT SCRIPTS=$SCRIPTS /usr/bin/perl ${SCRIPTS}/langpacks.pl
rm -rf ${DATA}/lock rmdir ${DATA}/langpacks-lock
...@@ -19,7 +19,7 @@ if [ ! -w ${DOCROOT} ]; then ...@@ -19,7 +19,7 @@ if [ ! -w ${DOCROOT} ]; then
fi fi
# Lock the script to prevent running in parallel # Lock the script to prevent running in parallel
if [ ! mkdir ${DATA}/lock ]; then if ! mkdir ${DATA}/update-pot-lock; then
echo "The script is running" >&2 echo "The script is running" >&2
exit 0 exit 0
fi fi
...@@ -33,14 +33,15 @@ TEMP=${WORK}/temp ...@@ -33,14 +33,15 @@ TEMP=${WORK}/temp
[ ! -d ${DOCROOT}/pot ] && mkdir ${DOCROOT}/pot [ ! -d ${DOCROOT}/pot ] && mkdir ${DOCROOT}/pot
mahararemote='https://git.mahara.org/mahara/mahara.git' mahararemote='https://git.mahara.org/mahara/mahara.git'
#mahararemote='git@git.mahara.org/mahara/mahara.git' # mahararemote='git@git.mahara.org/mahara/mahara.git'
#mahararemote='git@github.com:MaharaProject/mahara.git' # mahararemote='git@github.com:MaharaProject/mahara.git'
if [ ! -d ${GITDIR} ]; then if [ ! -d ${GITDIR} ]; then
echo "git clone ${mahararemote} ${GITDIR}" echo "git clone ${mahararemote} ${GITDIR}"
git clone --quiet ${mahararemote} ${GITDIR} git clone --quiet ${mahararemote} ${GITDIR}
fi fi
bzr launchpad-login dev-mahara
[ ! -d "${WORK}/mahara-lang-bzr" ] && bzr init-repo ${WORK}/mahara-lang-bzr [ ! -d "${WORK}/mahara-lang-bzr" ] && bzr init-repo ${WORK}/mahara-lang-bzr
BZR=${WORK}/mahara-lang-bzr BZR=${WORK}/mahara-lang-bzr
...@@ -190,4 +191,4 @@ for branch in ${branches} ; do ...@@ -190,4 +191,4 @@ for branch in ${branches} ; do
done done
# Unlock the script # Unlock the script
rm -rf ${DATA}/lock rmdir ${DATA}/update-pot-lock
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment