Commit c5032fe3 authored by Sebastian Diez's avatar Sebastian Diez

Merge branch 'develop' into 75-use-namespaces-and-new-class-names-in-the-tasks

parents 4e3337df fa2cdee5
Pipeline #873 passed with stages
in 3 minutes and 19 seconds
......@@ -3,9 +3,10 @@ variables:
GIT_SSL_NO_VERIFY: "true"
before_script:
- apk add bash --update
- apk add bash --no-cache
stages:
- dump
- build
- layout
- deploy
......@@ -23,7 +24,8 @@ build:
paths:
- ./
expire_in: '1h'
environment: ${CI_BUILD_REF_NAME}
except:
- assets
layout:
stage: layout
......@@ -40,17 +42,22 @@ layout:
environment: ${CI_BUILD_REF_NAME}
dependencies:
- build
except:
- assets
.deploy-template: &deploy_template
stage: deploy
script:
- apk add openssh-client
before_script:
- apk add openssh-client bash --no-cache
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | ssh-add -
script:
- ./.gitlab-ci/scripts/deployer.sh -f/src/.gitlab-ci/deployer/deploy.php deploy ${CI_BUILD_REF_NAME}
when: manual
dependencies:
- layout
except:
- assets
deploy-master:
<<: *deploy_template
......@@ -67,3 +74,21 @@ deploy-develop:
url: https://extensions-dev.typo3.org/
only:
- develop
dump-assets:
<<: *deploy_template
stage: dump
image: alpine:3.5
artifacts:
paths:
- ./assets/
expire_in: '3d'
script:
- apk add rsync --no-cache
- rsync -ah -e "ssh -p 22179" extensionsdev@extensions-dev.typo3.org:ci/shared/ ./assets/
- ssh -p22179 extensionsdev@extensions-dev.typo3.org "mysqldump -u${DEV_DATABASE_USER} -p${DEV_DATABASE_PASSWORD} -h127.0.0.1 extensionsdev | gzip -9 -c" > ./assets/db.sql.gz
dependencies:
when:
only:
- assets
except:
......@@ -35,10 +35,10 @@
},
"scripts": {
"post-install-cmd": [
"./bin/typo3cms install:generatepackagestates 0 1"
"typo3cms install:generatepackagestates 0 1"
],
"post-update-cmd": [
"./bin/typo3cms install:generatepackagestates 0 1"
"typo3cms install:generatepackagestates 0 1"
]
},
"extra": {
......
This diff is collapsed.
......@@ -169,7 +169,7 @@ class tx_ter_api
);
}
if (($typo3DependencyCheck = $this->checkExtensionDependencyOnSupportedTypo3Version($extensionInfoData)) !== true) {
if (($typo3DependencyCheck = $this->checkExtensionDependencyOnSupportedTypo3Version($extensionInfoData)) !== true && $uploadUserRecordArr['admin'] !== true) {
switch ($typo3DependencyCheck) {
case TX_TER_ERROR_UPLOADEXTENSION_TYPO3DEPENDENCYINCORRECT:
$message = 'Extension does not have a dependency for a supported version of TYPO3. See http://typo3.org/news/article/announcing-ter-cleanup-process/ for how to fix this.';
......
......@@ -468,7 +468,7 @@ function versionConv($input, $rev = false)
$result = intval(substr($int, 0, -6)) . '.' . intval(substr($int, -6, -3)) . '.' . intval(substr($int, -3)) . $suffix;
}
} else { // From string to double
$result = \TYPO3\CMS\Core\Utility\GeneralUtility::int_from_ver($input);
$result = \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger($input);
if (preg_match('/(dev|a|b|rc)([0-9]*)$/', strtolower($input), $reg)) {
$dec = intval($subDecIndex[$reg[1]]) . $reg[2];
$result = (double)(($result - 1) . '.' . $dec);
......@@ -586,4 +586,4 @@ function xmlentities($string)
return str_replace(['&', '"', "'", '<', '>'], ['&amp;', '&quot;', '&apos;', '&lt;', '&gt;'], $string);
}
?>
\ No newline at end of file
?>
......@@ -173,15 +173,14 @@ class ExtensionController extends \T3o\TerFe2\Controller\AbstractController
$this->view->assign('extensions', $extensions);
}
/**
* Action that displays a single extension
*
* @param \T3o\TerFe2\Domain\Model\Extension $extension The extension to display
* @param string $extensionKey Extension key
* @return void
* @dontvalidate $extension
* @dontvalidate $extensionKey
*
* @ignorevalidation $extension
*/
public function showAction(\T3o\TerFe2\Domain\Model\Extension $extension = NULL, $extensionKey = NULL)
{
......
......@@ -148,8 +148,8 @@ abstract class AbstractProvider implements \T3o\TerFe2\Provider\ProviderInterfac
protected function getVersionByRange($version)
{
$version = \TYPO3\CMS\Extbase\Utility\ArrayUtility::trimExplode('-', $version);
$minimum = (!empty($version[0]) ? \TYPO3\CMS\Core\Utility\GeneralUtility::int_from_ver($version[0]) : 0);
$maximum = (!empty($version[1]) ? \TYPO3\CMS\Core\Utility\GeneralUtility::int_from_ver($version[1]) : 0);
$minimum = (!empty($version[0]) ? \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger($version[0]) : 0);
$maximum = (!empty($version[1]) ? \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger($version[1]) : 0);
return array($minimum, $maximum);
}
......
......@@ -210,7 +210,7 @@ class ImportAllExtensionsTask extends \TYPO3\CMS\Extbase\Scheduler\Task
'title' => $extData['title'],
'description' => $extData['description'],
'author' => $this->createAuthor($extData),
'version_number' => \TYPO3\CMS\Core\Utility\GeneralUtility::int_from_ver($extData['version']),
'version_number' => \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger($extData['version']),
'version_string' => $extData['version'],
'upload_date' => $extData['lastuploaddate'],
'upload_comment' => $extData['uploadcomment'],
......@@ -404,8 +404,8 @@ class ImportAllExtensionsTask extends \TYPO3\CMS\Extbase\Scheduler\Task
protected function getVersionByRange($version)
{
$version = \TYPO3\CMS\Extbase\Utility\ArrayUtility::trimExplode('-', $version);
$minimum = (!empty($version[0]) ? \TYPO3\CMS\Core\Utility\GeneralUtility::int_from_ver($version[0]) : 0);
$maximum = (!empty($version[1]) ? \TYPO3\CMS\Core\Utility\GeneralUtility::int_from_ver($version[1]) : 0);
$minimum = (!empty($version[0]) ? \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger($version[0]) : 0);
$maximum = (!empty($version[1]) ? \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger($version[1]) : 0);
return array($minimum, $maximum);
}
......
......@@ -78,7 +78,7 @@ class ExtensionIconViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractT
}
if (empty($imageUrl) || !file_exists(\T3o\TerFe2\Utility\File::getAbsolutePathFromUrl($imageUrl))) {
$imageUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl('typo3/clear.gif');
return '';
}
$this->tag->addAttribute('src', $imageUrl);
......
{namespace terfe2=T3o\TerFe2\ViewHelpers}
<dl class="row">
<dt class="col-sm-3"><f:translate key="version" /></dt>
<dd class="col-sm-9">{extension.lastVersion.versionString}</dd>
<dt class="col-sm-3"><f:translate key="last_updated" /></dt>
<dd class="col-sm-9"><terfe2:dateTime format="{settings.dateFormat}">{extension.lastVersion.uploadDate}</terfe2:dateTime></dd>
<dt class="col-sm-3"><f:translate key="first_upload" /></dt>
<dd class="col-sm-9"><terfe2:dateTime format="{settings.dateFormat}">{extension.crdate}</terfe2:dateTime></dd>
<dt class="col-sm-3"><f:translate key="downloads" /></dt>
<dd class="col-sm-9"><f:format.number decimals="0" thousandsSeparator="," decimalSeparator=".">{extension.downloads}</f:format.number></dd>
<dt class="col-sm-4"><f:translate key="version" /></dt>
<dd class="col-sm-8">{extension.lastVersion.versionString}</dd>
<dt class="col-sm-4">Last update</dt>
<dd class="col-sm-8"><f:format.date format="%d. %b %Y">@{extension.lastVersion.uploadDate}</f:format.date></dd>
<dt class="col-sm-4"><f:translate key="first_upload" /></dt>
<dd class="col-sm-8"><f:format.date format="%d. %b %Y">{extension.crdate}</f:format.date></dd>
<dt class="col-sm-4"><f:translate key="downloads" /></dt>
<dd class="col-sm-8"><f:format.number decimals="0" thousandsSeparator="," decimalSeparator=".">{extension.downloads}</f:format.number></dd>
<f:security.ifHasRole role="{settings.reviewerGroupUid}">
<dt class="col-sm-3">Owner:</dt>
<dd class="col-sm-9">Name: {owner.name}<br />Email: {owner.email}<br />Username: {owner.username}</dd>
<dt class="col-sm-4">Owner:</dt>
<dd class="col-sm-8">Name: {owner.name}<br />Email: {owner.email}<br />Username: {owner.username}</dd>
</f:security.ifHasRole>
<dt class="col-sm-3"><f:translate key="category" /></dt>
<dd class="col-sm-9">
<dt class="col-sm-4"><f:translate key="category" /></dt>
<dd class="col-sm-8">
<f:if condition="{extension.lastVersion.emCategory}">
<f:then>
<f:translate key="category_{extension.lastVersion.emCategory}" />
......@@ -24,12 +24,12 @@
</f:else>
</f:if>
</dd>
<dt class="col-sm-3"><f:translate key="dependencies" /></dt>
<dd class="col-sm-9"><f:render partial="InlineRelationList" arguments="{relations: extension.lastVersion.dependencies}" /></dd>
<dt class="col-sm-3"><f:translate key="conflicts" /></dt>
<dd class="col-sm-9"><f:render partial="InlineRelationList" arguments="{relations: extension.lastVersion.conflicts}" /></dd>
<dt class="col-sm-3"><f:translate key="manual" /></dt>
<dd class="col-sm-9">
<dt class="col-sm-4"><f:translate key="dependencies" /></dt>
<dd class="col-sm-8"><f:render partial="InlineRelationList" arguments="{relations: extension.lastVersion.dependencies}" /></dd>
<dt class="col-sm-4"><f:translate key="conflicts" /></dt>
<dd class="col-sm-8"><f:render partial="InlineRelationList" arguments="{relations: extension.lastVersion.conflicts}" /></dd>
<dt class="col-sm-4"><f:translate key="manual" /></dt>
<dd class="col-sm-8">
<f:if condition="{documentationLink}">
<f:then>
<terfe2:raw>{documentationLink}</terfe2:raw>
......@@ -55,45 +55,47 @@
</f:if>
</dd>
<f:if condition="{extension.forgeLink}">
<dt class="col-sm-3">
<dt class="col-sm-4">
<f:translate key="bugtracker" />
</dt>
<dd class="col-sm-9">
<dd class="col-sm-8">
<f:link.external rel="nofollow" uri="{extension.forgeLink}" target="_blank">
<f:translate key="found_a_bug" />
</f:link.external>
</dd>
</f:if>
<f:if condition="{extension.repositoryUrl}">
<dt class="col-sm-3">
<dt class="col-sm-4">
<f:translate key="repository_url" />
</dt>
<dd class="col-sm-9">
<dd class="col-sm-8">
<f:link.external rel="nofollow" uri="{extension.repositoryUrl}" target="_blank">
<f:translate key="repository_url_value" />
</f:link.external>
</dd>
</f:if>
<f:if condition="{flattrUrl}">
<dt class="col-sm-3">
<dt class="col-sm-4">
<f:translate key="donate" />
</dt>
<dd class="col-sm-9">
<dd class="col-sm-8">
<f:link.external uri="{flattrUrl}" target="_blank"><img
src="https://api.flattr.com/button/flattr-badge-large.png"
alt="{f:translate(key:'donate')}" /></f:link.external>
</dd>
</f:if>
<f:if condition="{extension.paypalUrl}">
<dt class="col-sm-3">
<dt class="col-sm-4">
<f:translate key="like_it" />
</dt>
<dd class="col-sm-9">
<dd class="col-sm-8">
<f:link.external rel="nofollow" uri="{extension.paypalUrl}" target="_blank">
<f:translate key="donate_url" />
</f:link.external>
</dd>
</f:if>
<dt class="col-sm-3"><f:translate key="author" /></dt>
<dd class="col-sm-9">{owner.name}</dd>
<f:if condition="{extension.lastVersion.author}">
<dt class="col-sm-4"><f:translate key="author" /></dt>
<dd class="col-sm-8">{extension.lastVersion.author.name}</dd>
</f:if>
</dl>
......@@ -16,7 +16,7 @@
<f:if condition="{version.reviewState} == -1">class="table-danger"</f:if>
>
<td>
<strong>{version.versionString}</strong>
<strong>{version.versionString}</strong> / <span class="ter-ext-state-{extension.lastVersion.state}">{extension.lastVersion.state}</span>
<br />
<small>
<f:format.date format="F d, Y">{version.uploadDate}</f:format.date>
......
<h3>Installation</h3>
<div class="mb-3" id="accordion" role="tablist" aria-multiselectable="true">
<div class="card bgWhite">
<div class="card-header" role="tab" id="headingOne">
<h5 class="mb-0">
<a data-toggle="collapse" data-parent="#accordion" href="#install-zip" aria-expanded="true" aria-controls="collapseOne">
Install extension via ZIP file
</a>
</h5>
</div>
<div id="install-zip" class="collapse show" role="tabpanel" aria-labelledby="headingOne">
<div class="card-block">
<ol>
<li>
<f:link.action controller="Extension" action="download" arguments="{extension : extension, versionString : extension.lastVersion.versionString, format : 'zip'}">
Download ZIP file
</f:link.action>
</li>
<li>
Log into your TYPO3 backend
</li>
<li>
Go to Extension Manager module
</li>
<li>
Press the upload button on the top bar
</li>
<li>
Select the ZIP file and upload it. If you want to overwrite an existing extension installation, activate the
checkbox.
</li>
</ol>
</div>
</div>
</div>
<f:if condition="{extension.composerPackageName}">
<div class="card bgWhite">
<div class="card-header" role="tab" id="headingTwo">
<h5 class="mb-0">
<a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#install-composer" aria-expanded="false" aria-controls="collapseTwo">
Install extension via composer command
</a>
</h5>
</div>
<div id="install-composer" class="collapse" role="tabpanel" aria-labelledby="headingTwo">
<div class="card-block">
<ol>
<li>
Go to your folder where the root composer.json file is located
</li>
<li>
Type: <code>composer require {extension.composerPackageName}</code> to get the latest version that runs on
your TYPO3 version.
</li>
</ol>
</div>
</div>
</div>
</f:if>
<div class="card bgWhite">
<div class="card-header" role="tab" id="headingThree">
<h5 class="mb-0">
<a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#install-t3x" aria-expanded="false" aria-controls="collapseThree">
Install extension with T3X file
</a>
</h5>
</div>
<div id="install-t3x" class="collapse" role="tabpanel" aria-labelledby="headingThree">
<div class="card-block">
<ol>
<li>
<f:link.action controller="Extension" action="download" arguments="{extension : extension, versionString : extension.lastVersion.versionString, format : 't3x'}">
Download T3X file
</f:link.action>
</li>
<li>
Log into your TYPO3 backend
</li>
<li>
Go to Extension Manager module
</li>
<li>
Press the upload button on the top bar
</li>
<li>
Select the T3X file and upload it. If you want to overwrite an existing extension installation, activate the checkbox.
</li>
</ol>
</div>
</div>
</div>
</div>
......@@ -58,37 +58,6 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$_EXTKEY]['extensionProviders']['soap'
),
);
// Register create zip archives task
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\T3o\TerFe2\Task\CreateExtensionFilesTask::class] = array(
'extension' => $_EXTKEY,
'title' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_db.xml:tx_terfe2_task_createextensionfilestask.name',
'description' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_db.xml:tx_terfe2_task_createextensionfilestask.description',
'additionalFields' => 'tx_terfe2_task_createextensionfilestaskadditionalfieldprovider',
);
// Register extension list update task
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\T3o\TerFe2\Task\UpdateExtensionListTask::class] = array(
'extension' => $_EXTKEY,
'title' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_db.xml:tx_terfe2_task_updateextensionlisttask.name',
'description' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_db.xml:tx_terfe2_task_updateextensionlisttask.description',
'additionalFields' => 'tx_terfe2_task_updateextensionlisttaskadditionalfieldprovider',
);
// Register update downloads task
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\T3o\TerFe2\Task\UpdateDetailsTask::class] = array(
'extension' => $_EXTKEY,
'title' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_db.xml:tx_terfe2_task_updatedetailstask.name',
'description' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_db.xml:tx_terfe2_task_updatedetailstask.description',
'additionalFields' => 'tx_terfe2_task_updatedetailstaskadditionalfieldprovider',
);
// Register download counter task
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\T3o\TerFe2\Task\DownloadCounterTask::class] = array(
'extension' => $_EXTKEY,
'title' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_db.xml:tx_terfe2_task_downloadcountertask.name',
'description' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_db.xml:tx_terfe2_task_downloadcountertask.description',
);
// Register import from queue task
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\T3o\TerFe2\Task\ImportExtensionsFromQueueTask::class] = array(
'extension' => $_EXTKEY,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment