Skip to content

Instantly share code, notes, and snippets.

View Opencontent's full-sized avatar

OpenContent Developer Opencontent

View GitHub Profile

Automatismo per pubblicare una release

Dato un repo github che contiene solamente il composer delle dipendenze di altri repo, l'obiettivo è esporre un changelog delle modifiche di tutti i repo.

Prerequisiti

Installare composer-lock-diff (fork di Opencontent)

git clone https://github.com/Opencontent/composer-lock-diff.git
cd composer-lock-diff
<?php
$path = '/Users/luca/git/AWS/solr-consorzioweb/java/solr';
$objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);
foreach ($objects as $entry){
if ($entry->getFilename() == "schema.xml" ){
chdir($entry->getPath());
$path = $entry->getPath() . "/schema.xml";
$content = file_get_contents($path);
ALTER TABLE eztags ADD main_language_id integer not null default 0;
ALTER TABLE eztags ADD language_mask integer not null default 0;
-- ALTER TABLE eztags_attribute_link ADD priority integer not null default 0;
DROP index IF EXISTS eztags_keyword;
CREATE TABLE eztags_keyword (
keyword_id integer not null default 0,
language_id integer not null default 0,
keyword varchar(255) NOT NULL default '',
<?php
require 'autoload.php';
$cli = eZCLI::instance();
$script = eZScript::instance( array( 'description' => ( "OpenContent Change VarDir name" ),
'use-session' => false,
'use-modules' => true,
'use-extensions' => true ) );
$script->startup();
<?php
/*
[ImportSettings]
AvailableSourceHandlers[]=xmlimporter
[xmlimporter-HandlerSettings]
Enabled=true
Name=OCExportAs XML Import Handler
ClassName=OCExportasXMLImporter
<?php
/*
Esempio:
cd <ez_doc_root>;
php list_zone_and_block_in_use.php -sbackend --exclude-subtree=541500,595702,515441,165686,212,581893,27411
Restitusce qualcosa simile a:
Zone
10ZonesLayout1
2ZonesLayout1
php update/common/scripts/5.0/deduplicatecontentstategrouplanguage.php -sbackend;
php update/common/scripts/5.0/disablesuspicioususers.php -sbackend;
php update/common/scripts/5.0/restorexmlrelations.php -sbackend;
php update/common/scripts/5.1/fiximagesoutsidevardir.php -sbackend;
php update/common/scripts/5.3/recreateimagesreferences.php -sbackend;
php update/common/scripts/5.3/updatenodeassignmentparentremoteids.php -sbackend;
php update/common/scripts/5.4/cleanuntranslatablerelations.php -sbackend;
-- dbupdate-4.6.0-to-4.7.0.sql
SET storage_engine=InnoDB;
UPDATE ezsite_data SET value='4.7.0' WHERE name='ezpublish-version';
UPDATE ezsite_data SET value='1' WHERE name='ezpublish-release';
ALTER TABLE ezpending_actions ADD COLUMN id int(11) AUTO_INCREMENT PRIMARY KEY;
var cleanFilterValue = function(values){
if(!$.isArray(values)){
values = [values];
}
var data = $.map(values, function(str){
str = $.trim(str);
str = str.replace(/'/g, "\\'");
//str = str.replace("(","\\("); //solo ocopendata >= 2.13 interpreta l'escape delle parentesi
//str = str.replace(")","\\)"); //solo ocopendata >= 2.13 interpreta l'escape delle parentesi
return str;
<?php
require 'autoload.php';
$script = eZScript::instance( array( 'description' => ( 'Download images from endpoint' ),
'use-session' => false,
'use-modules' => true,
'use-extensions' => true ) );
$script->startup();