* Adjust the pack script file.
This commit is contained in:
@@ -2,13 +2,10 @@ VERSION = $(shell head -n 1 VERSION)
|
||||
XUANVERSION = $(shell head -n 1 xuanxuan/XUANVERSION)
|
||||
XVERSION = $(shell head -n 1 xuanxuan/XVERSION)
|
||||
|
||||
#XUANPATH := $(XUANXUAN_SRC_PATH)
|
||||
#BUILD_PATH := $(if $(ZENTAO_BUILD_PATH),$(ZENTAO_BUILD_PATH),$(shell pwd))
|
||||
#RELEASE_PATH := $(if $(ZENTAO_RELEASE_PATH),$(ZENTAO_RELEASE_PATH),$(shell pwd))
|
||||
XUANPATH := /home/gitlab-runner/ci/gitlab/xuan/
|
||||
XUAN_WEB_PATH := /home/gitlab-runner/ci/packages/web
|
||||
BUILD_PATH := /home/z/ci/pip_build/
|
||||
RELEASE_PATH := /home/z/ci/pip_release/
|
||||
XUANPATH := $(XUANXUAN_SRC_PATH)
|
||||
BUILD_PATH := $(if $(ZENTAO_BUILD_PATH),$(ZENTAO_BUILD_PATH),$(shell pwd))
|
||||
RELEASE_PATH := $(if $(ZENTAO_RELEASE_PATH),$(ZENTAO_RELEASE_PATH),$(shell pwd))
|
||||
XUAN_WEB_PATH := $(ZENTAO_BUILD_PATH)/web
|
||||
|
||||
all:
|
||||
make clean
|
||||
@@ -257,6 +254,7 @@ enrpm:
|
||||
cp ~/rpmbuild/RPMS/noarch/zentaoalm-${VERSION}-1.noarch.rpm ./
|
||||
rm -rf ~/rpmbuild
|
||||
ciCommon:
|
||||
make clean
|
||||
git pull
|
||||
make common
|
||||
|
||||
@@ -307,19 +305,45 @@ cizip:
|
||||
rm -rf tmp/ *.sh zentaobiz* zentaomax* $(RELEASE_PATH)/ZenTaoALM.$(VERSION)*.zip $(RELEASE_PATH)/ZenTaoPMS.$(VERSION)*.zip $(RELEASE_PATH)/pmsPack/*.zip
|
||||
mv ZenTaoPMS.$(VERSION).zip ZenTaoALM.$(VERSION).int.zip $(RELEASE_PATH)
|
||||
mv ZenTaoALM.$(VERSION).int.php*.zip ZenTaoPMS.$(VERSION).php*.zip $(RELEASE_PATH)/pmsPack
|
||||
ci:
|
||||
syspack:
|
||||
php tools/packDeb.php $(VERSION)
|
||||
sh deb.sh
|
||||
rm -rf tmp/ deb.sh
|
||||
php tools/packRpm.php $(VERSION)
|
||||
sh rpm.sh
|
||||
rm -rf tmp/ rpm.sh
|
||||
commitBuild:
|
||||
make ciCommon
|
||||
php tools/packZip.php $(VERSION)
|
||||
sh zip.sh
|
||||
rm -rf tmp/
|
||||
php tools/packDeb.php $(VERSION)
|
||||
sh deb.sh
|
||||
rm -rf tmp/
|
||||
php tools/packRpm.php $(VERSION)
|
||||
sh rpm.sh
|
||||
rm -rf tmp/
|
||||
rm -rf tmp/ zip.sh
|
||||
commitClear:
|
||||
rm -rf zentaobiz* zentaomax* $(RELEASE_PATH)/pmsPack/*.zip
|
||||
commitMove:
|
||||
mv ZenTaoALM.$(VERSION).int.php*.zip ZenTaoPMS.$(VERSION).php*.zip $(RELEASE_PATH)/pmsPack
|
||||
releaseBuild:
|
||||
make commitBuild
|
||||
make syspack
|
||||
releaseClear:
|
||||
make commitClear
|
||||
rm -rf $(RELEASE_PATH)/pmsPack/deb/* $(RELEASE_PATH)/pmsPack/rpm/*
|
||||
releaseMove:
|
||||
make commitMove
|
||||
mv *.deb $(RELEASE_PATH)/pmsPack/deb/
|
||||
mv *.rpm $(RELEASE_PATH)/pmsPack/rpm/
|
||||
commitCi:
|
||||
make commitBuild
|
||||
make commitClear
|
||||
make commitMove
|
||||
releaseCi:
|
||||
make releaseBuild
|
||||
make releaseClear
|
||||
make releaseMove
|
||||
ci:
|
||||
make commitBuild
|
||||
make syspack
|
||||
rm -rf zentaobiz* zentaomax* $(RELEASE_PATH)/ZenTaoALM.$(VERSION)*.zip $(RELEASE_PATH)/ZenTaoPMS.$(VERSION)*.zip $(RELEASE_PATH)/*.deb $(RELEASE_PATH)/*.rpm *.sh $(RELEASE_PATH)/pmsPack/*.zip $(RELEASE_PATH)/pmsPack/deb/* $(RELEASE_PATH)/pmsPack/rpm/*
|
||||
mv ZenTaoPMS.$(VERSION).zip ZenTaoALM.$(VERSION).int.zip $(RELEASE_PATH)
|
||||
mv ZenTaoALM.$(VERSION).int.php*.zip ZenTaoPMS.$(VERSION).php*.zip $(RELEASE_PATH)/pmsPack
|
||||
mv *.deb $(RELEASE_PATH)/pmsPack/deb
|
||||
mv *.rpm $(RELEASE_PATH)/pmsPack/rpm
|
||||
mv *.deb $(RELEASE_PATH)/pmsPack/deb/
|
||||
mv *.rpm $(RELEASE_PATH)/pmsPack/rpm/
|
||||
|
||||
+4
-4
@@ -10,13 +10,13 @@ $fileList[] = "{$basePath}/ZenTaoPMS.$pmsVersion.php5.4_5.6.zip";
|
||||
$fileList[] = "{$basePath}/ZenTaoPMS.$pmsVersion.php7.0.zip";
|
||||
$fileList[] = "{$basePath}/ZenTaoPMS.$pmsVersion.php7.1.zip";
|
||||
$fileList[] = "{$basePath}/ZenTaoPMS.$pmsVersion.php7.2_7.4.zip";
|
||||
$fileList[] = "{$basePath}/ZenTaoPMS.$pmsVersion.php8.1.zip";
|
||||
$fileList[] = "{$basePath}/ZenTaoPMS.$pmsVersion.php8.0.zip";
|
||||
|
||||
$fileList[] = "{$basePath}/ZenTaoALM.$pmsVersion.int.php5.4_5.6.zip";
|
||||
$fileList[] = "{$basePath}/ZenTaoALM.$pmsVersion.int.php7.0.zip";
|
||||
$fileList[] = "{$basePath}/ZenTaoALM.$pmsVersion.int.php7.1.zip";
|
||||
$fileList[] = "{$basePath}/ZenTaoALM.$pmsVersion.int.php7.2_7.4.zip";
|
||||
$fileList[] = "{$basePath}/ZenTaoALM.$pmsVersion.int.php8.1.zip";
|
||||
$fileList[] = "{$basePath}/ZenTaoALM.$pmsVersion.int.php8.0.zip";
|
||||
|
||||
foreach($fileList as $file) if(!file_exists($file)) echo basename($file) . " is not exists\n";
|
||||
|
||||
@@ -30,7 +30,7 @@ foreach(array('zh-cn', 'en') as $langType)
|
||||
$dirName = $langType == 'zh-cn' ? 'zentaopms' : 'zentaoalm';
|
||||
|
||||
/* Cycle the php versions. */
|
||||
foreach(array('5.4_5.6', '7.0', '7.1', '7.2_7.4', '8.1') as $phpVersion)
|
||||
foreach(array('5.4_5.6', '7.0', '7.1', '7.2_7.4', '8.0') as $phpVersion)
|
||||
{
|
||||
/* File name. */
|
||||
$workDir = "tmp/$packPrefix.{$version}.{$phpVersion}/";
|
||||
@@ -54,7 +54,7 @@ foreach(array('zh-cn', 'en') as $langType)
|
||||
|
||||
$command .= "sed -i 's/index.php/\/zentao\/index.php/' zentao/www/.htaccess\n";
|
||||
$command .= "cd ../../\n";
|
||||
$command .= "sudo dpkg -b buildroot/ {$packPrefix}.{$version}.php{$phpVersion}.1.all.deb\n";
|
||||
$command .= "dpkg -b buildroot/ {$packPrefix}.{$version}.php{$phpVersion}.1.all.deb\n";
|
||||
$command .= "mv *.deb ../../\n";
|
||||
|
||||
$command .= "rm -rf buildroot\n";
|
||||
|
||||
+3
-3
@@ -10,13 +10,13 @@ $fileList[] = "{$basePath}/ZenTaoPMS.$pmsVersion.php5.4_5.6.zip";
|
||||
$fileList[] = "{$basePath}/ZenTaoPMS.$pmsVersion.php7.0.zip";
|
||||
$fileList[] = "{$basePath}/ZenTaoPMS.$pmsVersion.php7.1.zip";
|
||||
$fileList[] = "{$basePath}/ZenTaoPMS.$pmsVersion.php7.2_7.4.zip";
|
||||
$fileList[] = "{$basePath}/ZenTaoPMS.$pmsVersion.php8.1.zip";
|
||||
$fileList[] = "{$basePath}/ZenTaoPMS.$pmsVersion.php8.0.zip";
|
||||
|
||||
$fileList[] = "{$basePath}/ZenTaoALM.$pmsVersion.int.php5.4_5.6.zip";
|
||||
$fileList[] = "{$basePath}/ZenTaoALM.$pmsVersion.int.php7.0.zip";
|
||||
$fileList[] = "{$basePath}/ZenTaoALM.$pmsVersion.int.php7.1.zip";
|
||||
$fileList[] = "{$basePath}/ZenTaoALM.$pmsVersion.int.php7.2_7.4.zip";
|
||||
$fileList[] = "{$basePath}/ZenTaoALM.$pmsVersion.int.php8.1.zip";
|
||||
$fileList[] = "{$basePath}/ZenTaoALM.$pmsVersion.int.php8.0.zip";
|
||||
|
||||
foreach($fileList as $file) if(!file_exists($file)) echo basename($file) . " is not exists\n";
|
||||
|
||||
@@ -30,7 +30,7 @@ foreach(array('zh-cn', 'en') as $langType)
|
||||
$dirName = $langType == 'zh-cn' ? 'zentaopms' : 'zentaoalm';
|
||||
|
||||
/* Cycle the php versions. */
|
||||
foreach(array('5.4_5.6', '7.0', '7.1', '7.2_7.4', '8.1') as $phpVersion)
|
||||
foreach(array('5.4_5.6', '7.0', '7.1', '7.2_7.4', '8.0') as $phpVersion)
|
||||
{
|
||||
/* File name. */
|
||||
$workDir = "tmp/$packPrefix.{$version}.{$phpVersion}/";
|
||||
|
||||
+5
-7
@@ -6,8 +6,7 @@ $liteVersion = isset($argv[2]) ? $argv[2] : '';
|
||||
|
||||
/* File pathes. */
|
||||
$basePath = dirname(dirname(__FILE__));
|
||||
//$releasePath = getenv('ZENTAO_RELEASE_PATH');
|
||||
$releasePath = '/home/z/ci/pip_release/';
|
||||
$releasePath = getenv('ZENTAO_RELEASE_PATH');
|
||||
$releasePath = !empty($releasePath) ? $releasePath : $basePath;
|
||||
if(!file_exists($releasePath . '/zentaopms.zip')) die("Please give me encrypted packages.\n");
|
||||
|
||||
@@ -52,22 +51,21 @@ foreach(array('zh-cn', 'en') as $langType)
|
||||
$dirName = $langType == 'zh-cn' ? 'zentaopms' : 'zentaoalm';
|
||||
|
||||
/* Cycle the php versions. */
|
||||
foreach(array('5.4_5.6', '7.0', '7.1', '7.2_7.4', '8.1') as $phpVersion)
|
||||
foreach(array('5.4_5.6', '7.0', '7.1', '7.2_7.4', '8.0') as $phpVersion)
|
||||
{
|
||||
/* File name. */
|
||||
$workDir = "tmp/$packPrefix.{$version}.{$phpVersion}/";
|
||||
$shellName = $workDir . "make.sh";
|
||||
$encryptedPhpVersion = $phpVersion == '8.0' ? '7.2_7.4' : $phpVersion;
|
||||
echo "Creating $shellName\n";
|
||||
|
||||
mkdir($workDir, 0777, true);
|
||||
|
||||
/* The commands of the shell. */
|
||||
$command = "cd $workDir\n";
|
||||
//$command .= "if [ ! -d ../$dirName ]; then unzip ../../$packPrefix.{$version}.zip -d ../ ; fi\n";
|
||||
$command .= "unzip ../../$packPrefix.{$version}.zip\n";
|
||||
//$command .= "cp -raf ../$dirName .\n";
|
||||
$command .= "cp -rf ../../zentaobiz.php$phpVersion/* $dirName/\n";
|
||||
$command .= "cp -rf ../../zentaomax.php$phpVersion/* $dirName/\n";
|
||||
$command .= "cp -rf ../../zentaobiz.php$encryptedPhpVersion/* $dirName/\n";
|
||||
$command .= "cp -rf ../../zentaomax.php$encryptedPhpVersion/* $dirName/\n";
|
||||
$command .= "zip -r ../../$packPrefix.{$version}.php{$phpVersion}.zip $dirName\n";
|
||||
|
||||
$command .= "rm -rf $dirName/\n";
|
||||
|
||||
Reference in New Issue
Block a user