create release script

This commit is contained in:
Dennis Eichhorn 2024-03-20 06:00:59 +00:00
parent b129d5718b
commit e8184659e5
2 changed files with 62 additions and 53 deletions

View File

@ -1,53 +0,0 @@
<?php
declare(strict_types=1);
use Rector\CodeQuality\Rector\Array_\CallableThisArrayToAnonymousFunctionRector;
use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector;
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
use Rector\CodeQuality\Rector\ClassMethod\LocallyCalledStaticMethodToNonStaticRector;
use Rector\CodeQuality\Rector\ClassMethod\OptionalParametersAfterRequiredRector;
use Rector\CodeQuality\Rector\Concat\JoinStringConcatRector;
use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector;
use Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector;
use Rector\CodeQuality\Rector\FuncCall\SimplifyRegexPatternRector;
use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector;
use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector;
use Rector\CodeQuality\Rector\If_\SimplifyIfNotNullReturnRector;
use Rector\CodeQuality\Rector\Isset_\IssetOnPropertyObjectToPropertyExistsRector;
use Rector\CodeQuality\Rector\Switch_\SingularSwitchToIfRector;
use Rector\Config\RectorConfig;
use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector;
// use Rector\EarlyReturn\Rector\Return_\ReturnBinaryAndToEarlyReturnRector;
use Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector;
use Rector\Set\ValueObject\SetList;
use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->sets([
PHPUnitSetList::PHPUNIT_100,
PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES,
]);
$rectorConfig->paths([
__DIR__ . '/../../tests',
__DIR__ . '/../../Modules/**/tests',
__DIR__ . '/../../phpOMS/tests',
]);
$rectorConfig->skip([
__DIR__ . '/../../vendor',
'*/vendor',
'*/node_modules',
__DIR__ . '/../../privateSetup',
__DIR__ . '/../../demoSetup',
__DIR__ . '/../../Build',
__DIR__ . '/../../MainRepository',
__DIR__ . '/../../Resources',
__DIR__ . '/../../Tools',
__DIR__ . '/../../Sandbox',
__DIR__ . '/../../cssOMS',
'*/Admin/Install/Application',
]);
};

62
Helper/Scripts/release.sh Normal file
View File

@ -0,0 +1,62 @@
#!/bin/bash
echo "#################################################"
echo "# Build develop"
echo "#################################################"
git submodule foreach git checkout develop
git submodule foreach git pull
git checkout develop
git pull
npm run scss
npm run release
echo "#################################################"
echo "# Update develop submodules"
echo "#################################################"
git submodule foreach git add .
git submodule foreach "git commit -m 'Preparing for master update' || true"
git submodule foreach git push
echo "#################################################"
echo "# Update develop main repo"
echo "#################################################"
git git add .
git git commit -m "Preparing for master update"
git git push
echo "#################################################"
echo "# Switch to master"
echo "#################################################"
git submodule foreach git checkout master
git submodule foreach git pull
git checkout master
git pull
echo "#################################################"
echo "# Merge develop"
echo "#################################################"
git submodule foreach git merge develop
git git merge develop
git submodule foreach git add .
git submodule foreach "git commit -m 'Update master' || true"
git submodule foreach git push
git git add .
git git commit -m "Update master"
git git push
echo "#################################################"
echo "# Switch to develop"
echo "#################################################"
git submodule foreach git checkout develop
git checkout develop