Beispiel #1
0
/**
* @author      Laurent Jouanneau
* @contributor
* @copyright   2006-2015 Laurent Jouanneau
* @link        http://www.jelix.org
* @licence     GNU General Public Licence see LICENCE file or http://www.gnu.org/licenses/gpl.html
*/
// arguments :  fichier.lf   chemin_source chemin_dist
require_once __DIR__ . '/../lib/autoloader.php';
if ($_SERVER['argc'] < 4) {
    exit(1);
}
array_shift($_SERVER['argv']);
// shift the script name
$options = array('verbose' => false, 'stripcomment' => false);
if (substr($_SERVER['argv'][0], 0, 1) == '-') {
    $sw = substr(array_shift($_SERVER['argv']), 1);
    $options['verbose'] = strpos('v', $sw) !== false;
    $options['stripcomment'] = strpos('c', $sw) !== false;
}
try {
    list($ficlist, $sourcedir, $distdir) = $_SERVER['argv'];
    jManifest::$verbose = $options['verbose'];
    jManifest::$stripComment = $options['stripcomment'];
    jManifest::process($ficlist, $sourcedir, $distdir, $_SERVER);
    exit(0);
} catch (Exception $e) {
    echo $e->getMessage();
    exit(1);
}
Beispiel #2
0
$IS_NIGHTLY = strpos($VERSION, 'SERIAL') !== false;
if ($IS_NIGHTLY) {
    $PACKAGE_NAME = 'wikirenderer-' . str_replace('SERIAL', '', $VERSION);
    if (substr($PACKAGE_NAME, -1, 1) == '.') {
        $PACKAGE_NAME = substr($PACKAGE_NAME, 0, -1);
    }
    $VERSION = str_replace('SERIAL', $HG_REVISION, $VERSION);
} else {
    $PACKAGE_NAME = 'wikirenderer-' . $VERSION;
}
if ($PACKAGE_TAR_GZ || $PACKAGE_ZIP) {
    $BUILD_TARGET_PATH = jBuildUtils::normalizeDir($MAIN_TARGET_PATH) . $PACKAGE_NAME . '/';
} else {
    $BUILD_TARGET_PATH = jBuildUtils::normalizeDir($MAIN_TARGET_PATH);
}
//----------------- Génération des sources
//... creation des repertoires
jBuildUtils::createDir($BUILD_TARGET_PATH);
//... execution du manifest
jManifest::process($BASE_PATH . 'wr.mn', $BASE_PATH, $BUILD_TARGET_PATH, ENV::getAll());
file_put_contents($BUILD_TARGET_PATH . 'VERSION', $VERSION);
//... packages
if ($PACKAGE_TAR_GZ) {
    exec('tar czf ' . $MAIN_TARGET_PATH . '/' . $PACKAGE_NAME . '.tar.gz -C ' . $MAIN_TARGET_PATH . ' ' . $PACKAGE_NAME);
}
if ($PACKAGE_ZIP) {
    chdir($MAIN_TARGET_PATH);
    exec('zip -r ' . $PACKAGE_NAME . '.zip ' . $PACKAGE_NAME);
    chdir(dirname(__FILE__));
}
exit(0);
Beispiel #3
0
$IS_NIGHTLY = strpos($LIB_VERSION, 'SERIAL') !== false;
if ($IS_NIGHTLY) {
    $PACKAGE_NAME = 'jelix-' . str_replace('SERIAL', '', $LIB_VERSION);
    if (substr($PACKAGE_NAME, -1, 1) == '.') {
        $PACKAGE_NAME = substr($PACKAGE_NAME, 0, -1);
    }
    $PACKAGE_NAME .= '-pdf-fonts';
    $LIB_VERSION = str_replace('SERIAL', $SOURCE_REVISION, $LIB_VERSION);
} else {
    $PACKAGE_NAME = 'jelix-' . $LIB_VERSION . '-pdf-fonts';
}
if ($PACKAGE_ZIP) {
    $BUILD_TARGET_PATH = jBuildUtils::normalizeDir($MAIN_TARGET_PATH) . $PACKAGE_NAME . '/';
} else {
    $BUILD_TARGET_PATH = jBuildUtils::normalizeDir($MAIN_TARGET_PATH);
}
//----------------- build the package
//... directory creation
jBuildUtils::createDir($BUILD_TARGET_PATH);
//... copying files
jManifest::process('build/manifests/fonts.mn', '.', $BUILD_TARGET_PATH, ENV::getAll());
//... packages
//if($PACKAGE_TAR_GZ){
//    exec('tar czf '.$MAIN_TARGET_PATH.'/'.$PACKAGE_NAME.'.tar.gz -C '.$MAIN_TARGET_PATH.' '.$PACKAGE_NAME);
//}
if ($PACKAGE_ZIP) {
    chdir($MAIN_TARGET_PATH);
    exec('zip -r ' . $PACKAGE_NAME . '.zip ' . $PACKAGE_NAME);
    chdir(dirname(__FILE__));
}
exit(0);
Beispiel #4
0
if ($VERSION == 'SERIAL') {
    $VERSION = 'SERIAL-' . $SOURCE_REVISION;
    $IS_NIGHTLY = true;
} else {
    $IS_NIGHTLY = false;
}
if ($PACKAGE_TAR_GZ || $PACKAGE_ZIP) {
    $BUILD_SUBPATH = 'additionnal-modules/';
    if ($IS_NIGHTLY) {
        $PACKAGE_NAME = 'additionnal-modules-nightly';
    } else {
        $PACKAGE_NAME = 'additionnal-modules-HG-' . $SOURCE_REVISION;
    }
} else {
    $BUILD_SUBPATH = 'lib/jelix-modules/';
}
//----------------- Génération des sources
//... creation des repertoires
jBuildUtils::createDir($MAIN_TARGET_PATH . $BUILD_SUBPATH);
//... execution des manifests
jManifest::process('build/manifests/jelix-modules.mn', 'lib/jelix-modules/', $MAIN_TARGET_PATH . $BUILD_SUBPATH, ENV::getAll());
//... packages
if ($PACKAGE_TAR_GZ) {
    exec('tar czf ' . $MAIN_TARGET_PATH . $PACKAGE_NAME . '.tar.gz -C ' . $MAIN_TARGET_PATH . ' ' . $BUILD_SUBPATH);
}
if ($PACKAGE_ZIP) {
    chdir($MAIN_TARGET_PATH);
    exec('zip -r ' . $PACKAGE_NAME . '.zip ' . $BUILD_SUBPATH);
    chdir(dirname(__FILE__));
}
exit(0);
Beispiel #5
0
    $VERSION = 'SERIAL-' . $SOURCE_REVISION;
    $IS_NIGHTLY = true;
} else {
    $IS_NIGHTLY = false;
}
if ($PACKAGE_TAR_GZ || $PACKAGE_ZIP) {
    if ($IS_NIGHTLY) {
        $PACKAGE_NAME = 'jbuildtools-nightly';
    } else {
        $PACKAGE_NAME = 'jbuildtools-' . $VERSION;
    }
    $BUILD_TARGET_PATH = jBuildUtils::normalizeDir($MAIN_TARGET_PATH) . $PACKAGE_NAME . '/';
} else {
    $BUILD_TARGET_PATH = jBuildUtils::normalizeDir($MAIN_TARGET_PATH);
}
//----------------- Génération des sources
//... creation des repertoires
jBuildUtils::createDir($BUILD_TARGET_PATH);
//... execution des manifests
jManifest::process('build/manifests/jbuildtools.mn', 'build/', $BUILD_TARGET_PATH, ENV::getAll());
file_put_contents($BUILD_TARGET_PATH . '/VERSION', $VERSION);
//... packages
if ($PACKAGE_TAR_GZ) {
    exec('tar czf ' . $MAIN_TARGET_PATH . '/' . $PACKAGE_NAME . '.tar.gz -C ' . $MAIN_TARGET_PATH . ' ' . $PACKAGE_NAME);
}
if ($PACKAGE_ZIP) {
    chdir($MAIN_TARGET_PATH);
    exec('zip -r ' . $PACKAGE_NAME . '.zip ' . $PACKAGE_NAME);
    chdir(dirname(__FILE__));
}
exit(0);
Beispiel #6
0
    $PACKAGE_NAME = $APPNAME . '-' . $VERSION;
}
Env::setFromFile('LIB_VERSION', 'lib/jelix/VERSION', true);
$IS_LIB_NIGHTLY = strpos($LIB_VERSION, 'SERIAL') !== false;
if ($IS_LIB_NIGHTLY) {
    $LIB_VERSION = str_replace('SERIAL', $SOURCE_REVISION, $LIB_VERSION);
}
if (preg_match('/\\.([a-z0-9\\-]+)$/i', $LIB_VERSION, $m)) {
    $LIB_VERSION_MAX = substr($LIB_VERSION, 0, -strlen($m[1])) . "*";
} else {
    $LIB_VERSION_MAX = $LIB_VERSION;
}
if ($PACKAGE_TAR_GZ || $PACKAGE_ZIP) {
    //$MAIN_TARGET_PATH = jBuildUtils::normalizeDir($MAIN_TARGET_PATH).$PACKAGE_NAME;
}
//----------------- Génération des sources
//... creation des repertoires
jBuildUtils::createDir($MAIN_TARGET_PATH);
//... execution des manifests
jManifest::process('build/manifests/' . $APPNAME . '.mn', '.', $MAIN_TARGET_PATH, ENV::getAll());
file_put_contents($MAIN_TARGET_PATH . $APPDIR . '/VERSION', $VERSION);
//... packages
if ($PACKAGE_TAR_GZ) {
    exec('tar czf ' . $MAIN_TARGET_PATH . $PACKAGE_NAME . '.tar.gz -C ' . $MAIN_TARGET_PATH . ' ' . $APPNAME);
}
if ($PACKAGE_ZIP) {
    chdir($MAIN_TARGET_PATH);
    exec('zip -r ' . $PACKAGE_NAME . '.zip ' . $APPNAME);
    chdir(dirname(__FILE__));
}
exit(0);
Beispiel #7
0
}
// jtpl standalone for wizard
Env::setFromFile('JTPL_VERSION', 'lib/jelix/tpl/VERSION', true);
if ($IS_NIGHTLY) {
    $JTPL_VERSION = str_replace('SERIAL', $SOURCE_REVISION, $JTPL_VERSION);
}
$var = ENV::getAll();
$var['JTPL_STANDALONE'] = true;
$jtplpath = $BUILD_TARGET_PATH . 'lib/installwizard/jtpl/';
jBuildUtils::createDir($jtplpath);
jManifest::process('build/manifests/jtpl-standalone.mn', '.', $jtplpath, $var);
file_put_contents($jtplpath . '/VERSION', $JTPL_VERSION);
// the standalone checker
$var = ENV::getAll();
$var['STANDALONE_CHECKER'] = true;
jManifest::process('build/manifests/jelix-checker.mn', '.', $BUILD_TARGET_PATH, $var);
file_put_contents($BUILD_TARGET_PATH . 'lib/jelix/VERSION', $LIB_VERSION);
// creation du fichier d'infos sur le build
$view = array('EDITION_NAME', 'PHP_VERSION_TARGET', 'SOURCE_REVISION', 'ENABLE_PHP_XMLRPC', 'ENABLE_PHP_JELIX', 'WITH_BYTECODE_CACHE', 'ENABLE_DEVELOPER', 'ENABLE_OPTIMIZED_SOURCE', 'STRIP_COMMENT');
$infos = '; --- build date:  ' . date('Y-m-d H:i') . "\n; --- lib version: {$LIB_VERSION}\n" . ENV::getIniContent($view);
file_put_contents($BUILD_TARGET_PATH . 'lib/jelix/BUILD', $infos);
//... packages
if ($PACKAGE_TAR_GZ || $PACKAGE_ZIP) {
    file_put_contents($MAIN_TARGET_PATH . '/PACKAGE_NAME', $PACKAGE_NAME);
}
if ($PACKAGE_TAR_GZ) {
    exec('tar czf ' . $MAIN_TARGET_PATH . '/' . $PACKAGE_NAME . '.tar.gz -C ' . $MAIN_TARGET_PATH . ' ' . $PACKAGE_NAME);
}
if ($PACKAGE_ZIP) {
    chdir($MAIN_TARGET_PATH);
    exec('zip -r ' . $PACKAGE_NAME . '.zip ' . $PACKAGE_NAME);
Beispiel #8
0
    if (version_compare($PHP_VERSION_TARGET, '5.3') > -1) {
        $PHP53 = 1;
        $PHP53ORMORE = 1;
    } elseif (version_compare($PHP_VERSION_TARGET, '5.2') > -1) {
        $PHP52 = 1;
    } else {
        die("PHP VERSION " . $PHP_VERSION_TARGET . " is not supported");
    }
} else {
    // no defined target, so php 5.2
    $PHP52 = 1;
}
//----------------- Génération des sources
//... creation des repertoires
jBuildUtils::createDir($BUILD_TARGET_PATH);
//... execution des manifests
jManifest::process('build/manifests/jtpl-standalone.mn', '.', $BUILD_TARGET_PATH, ENV::getAll());
if ($WITH_TESTS) {
    jManifest::process('build/manifests/jtpl-standalone-tests.mn', '.', $BUILD_TARGET_PATH, ENV::getAll());
}
file_put_contents($BUILD_TARGET_PATH . '/VERSION', $JTPL_VERSION);
//... packages
if ($PACKAGE_TAR_GZ) {
    exec('tar czf ' . $MAIN_TARGET_PATH . '/' . $PACKAGE_NAME . '.tar.gz -C ' . $MAIN_TARGET_PATH . ' ' . $PACKAGE_NAME);
}
if ($PACKAGE_ZIP) {
    chdir($MAIN_TARGET_PATH);
    exec('zip -r ' . $PACKAGE_NAME . '.zip ' . $PACKAGE_NAME);
    chdir(dirname(__FILE__));
}
exit(0);