Packaging scripts have been improved, and now use https://github.com/Kentzo/git-archive-all to archive the project and all submodules.
Former-commit-id: b5c9511a27
This commit is contained in:
parent
494b86f92e
commit
dc39725446
2 changed files with 32 additions and 46 deletions
|
@ -8,17 +8,16 @@ echo "# by their target). Useful for FTP deployment"
|
|||
echo "#"
|
||||
echo "#"
|
||||
|
||||
BRANCH="master"
|
||||
SRCDIR="../../../../"
|
||||
TEMPDIR="/tmp/baikal-flat-`date +%Y-%m-%d-%H-%M-%S`-temp"
|
||||
TEMPDIRDEREFERENCE="/tmp/baikal-flat-`date +%Y-%m-%d-%H-%M-%S`"
|
||||
TEMPDATE="`date +%Y-%m-%d-%H-%M-%S`"
|
||||
TEMPDIR="/tmp/baikal-flat-$TEMPDATE-temp"
|
||||
TEMPARCHIVE="$TEMPDIR/temparchive.tgz"
|
||||
TEMPDIRDEREFERENCE="/tmp/baikal-flat-$TEMPDATE"
|
||||
|
||||
# Export Project
|
||||
mkdir $TEMPDIR
|
||||
|
||||
BASEDIR="`dirname $0`"
|
||||
PATH_this="`cd $BASEDIR && cd $SRCDIR && pwd`/"
|
||||
git archive $BRANCH | tar -x -C $TEMPDIR
|
||||
# Requires the git-archive-all script by https://github.com/Kentzo (https://github.com/Kentzo/git-archive-all)
|
||||
mkdir $TEMPDIR && \
|
||||
git-archive-all --force-submodules $TEMPARCHIVE && \
|
||||
cd $TEMPDIR && tar -xzf $TEMPARCHIVE && rm $TEMPARCHIVE && \
|
||||
|
||||
# Dereferencig symlinks
|
||||
cp -RfL $TEMPDIR $TEMPDIRDEREFERENCE && \
|
||||
|
@ -29,43 +28,34 @@ TEMPDIR=$TEMPDIRDEREFERENCE && \
|
|||
# Jump to tempdir
|
||||
cd $TEMPDIR && \
|
||||
|
||||
# Cleaning git stuff
|
||||
rm .gitignore
|
||||
|
||||
# Cleaning CoreVersions
|
||||
rm -Rf CoreVersions
|
||||
|
||||
# Cleaning FrameworksVersions
|
||||
rm -Rf Core/Frameworks/Versions
|
||||
|
||||
# Cleaning Resources
|
||||
rm -f Core/Resources/Web/README.md
|
||||
rm -Rf Core/Resources/Web/TwitterBootstrap
|
||||
rm -f Core/Resources/Web/README.md && \
|
||||
rm -Rf Core/Resources/Web/TwitterBootstrap && \
|
||||
|
||||
# Cleaning Scripts
|
||||
rm -Rf Core/Scripts
|
||||
rm -Rf Core/Frameworks/Baikal/Scripts
|
||||
rm -Rf Core/Scripts && \
|
||||
rm -Rf Core/Frameworks/Baikal/Scripts && \
|
||||
|
||||
# Cleaning WWWRoot
|
||||
rm -Rf Core/Frameworks/Baikal/WWWRoot
|
||||
rm -Rf Core/Frameworks/BaikalAdmin/WWWRoot
|
||||
rm -Rf Core/Frameworks/Baikal/WWWRoot && \
|
||||
rm -Rf Core/Frameworks/BaikalAdmin/WWWRoot && \
|
||||
|
||||
# Cleaning Specific/Virtualhosts
|
||||
rm -Rf Specific/virtualhosts
|
||||
rm -Rf Specific/virtualhosts && \
|
||||
|
||||
# Moving HTML roots
|
||||
mv html/* .
|
||||
mv html/.htaccess .
|
||||
rm -Rf html
|
||||
mv html/* . && \
|
||||
mv html/.htaccess . && \
|
||||
rm -Rf html && \
|
||||
|
||||
# Tagging Distrib
|
||||
cat Core/Distrib.php | sed -e "s/\"regular\"/\"flat\"/g" > Core/Distrib2.php && \
|
||||
rm -f Core/Distrib.php && \
|
||||
mv Core/Distrib2.php Core/Distrib.php
|
||||
mv Core/Distrib2.php Core/Distrib.php && \
|
||||
|
||||
# Deploy empty DB
|
||||
mkdir -p Specific/db
|
||||
cp Core/Resources/Db/SQLite/db.sqlite Specific/db
|
||||
mkdir -p Specific/db && \
|
||||
cp Core/Resources/Db/SQLite/db.sqlite Specific/db && \
|
||||
|
||||
# Displaying result
|
||||
echo "# "$TEMPDIR
|
||||
|
|
|
@ -7,30 +7,26 @@ echo "# Packaging project for regular distribution"
|
|||
echo "#"
|
||||
echo "#"
|
||||
|
||||
BRANCH="master"
|
||||
SRCDIR="../../../../"
|
||||
TEMPDIR="/tmp/baikal-regular-`date +%Y-%m-%d-%H-%M-%S`"
|
||||
TEMPDATE="`date +%Y-%m-%d-%H-%M-%S`"
|
||||
TEMPDIR="/tmp/baikal-regular-$TEMPDATE"
|
||||
TEMPARCHIVE="$TEMPDIR/temparchive.tgz"
|
||||
|
||||
# Export Project
|
||||
mkdir $TEMPDIR
|
||||
|
||||
BASEDIR="`dirname $0`"
|
||||
PATH_this="`cd $BASEDIR && cd $SRCDIR && pwd`/"
|
||||
git archive $BRANCH | tar -x -C $TEMPDIR
|
||||
# Requires the git-archive-all script by https://github.com/Kentzo (https://github.com/Kentzo/git-archive-all)
|
||||
mkdir $TEMPDIR && \
|
||||
git-archive-all --force-submodules $TEMPARCHIVE && \
|
||||
cd $TEMPDIR && tar -xzf $TEMPARCHIVE && rm $TEMPARCHIVE && \
|
||||
|
||||
# Jump to tempdir
|
||||
cd $TEMPDIR && \
|
||||
|
||||
# Cleaning git stuff
|
||||
rm .gitignore
|
||||
|
||||
# Cleaning Scripts
|
||||
rm -Rf Core/Scripts
|
||||
rm -Rf Core/Frameworks/Baikal/Scripts
|
||||
rm -Rf Core/Scripts && \
|
||||
rm -Rf Core/Frameworks/Baikal/Scripts && \
|
||||
|
||||
# Deploy empty DB
|
||||
mkdir -p Specific/db
|
||||
cp Core/Resources/Db/SQLite/db.sqlite Specific/db
|
||||
mkdir -p Specific/db && \
|
||||
cp Core/Resources/Db/SQLite/db.sqlite Specific/db && \
|
||||
|
||||
# Displaying result
|
||||
echo "# "$TEMPDIR
|
||||
|
|
Loading…
Reference in a new issue