forked from horde/Stream_Wrapper
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
331 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
name: make release | ||
|
||
# manual workflow to make a new release for the default branch | ||
on: | ||
workflow_dispatch: | ||
branches: | ||
- FRAMEWORK_6_0 | ||
env: | ||
components: "/home/runner/.composer/web/components/bin/horde-components -c /home/runner/.composer/web/components/config/maintaina.conf.dist" | ||
COMPOSER_ALLOW_SUPERUSER: 1 | ||
|
||
jobs: | ||
run: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
matrix: | ||
operating-system: ['ubuntu-20.04'] | ||
php-versions: ['8.1'] | ||
steps: | ||
- name: Setup git | ||
run: | | ||
mkdir -p ~/.ssh/ && ssh-keyscan -t rsa github.com > ~/.ssh/known_hosts | ||
git config --global user.name "Github CI Runner" | ||
git config --global user.email "[email protected]" | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: gettext | ||
ini-values: post_max_size=512M, max_execution_time=360 | ||
tools: composer:v2 | ||
- name: Setup composer | ||
run: | | ||
composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} | ||
composer global config repositories.0 composer https://horde-satis.maintaina.com | ||
composer global config minimum-stability dev | ||
composer config --no-plugins --global allow-plugins.horde/horde-installer-plugin true | ||
composer global require horde/horde-installer-plugin "2.3.0" | ||
composer global require horde/components "dev-FRAMEWORK_6_0" | ||
- name: write changelog | ||
run: | | ||
entries_amount=0; max_entries=100 | ||
PATTERN="^\[.*\] .*" | ||
for commit in $(git rev-list FRAMEWORK_6_0) | ||
do | ||
msg=$(git log --format=%B -n 1 $commit | head -n 1) | ||
if [ $entries_amount -gt $max_entries ]; then break; fi | ||
if [[ $msg == 'Released'* ]]; then break; fi | ||
if [[ $msg == 'Development mode for'* ]]; then break; fi | ||
if [[ $msg =~ $PATTERN ]]; then | ||
$components changed "$msg" | ||
let "entries_amount+=1" | ||
fi | ||
done | ||
- name: make release and push | ||
run: | | ||
$components release for maintaina | ||
git push | ||
git push origin --tags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,253 @@ | ||
<?php | ||
/* | ||
* Horde Components Configuration File | ||
* | ||
* This file contains the configuration settings for the Horde components | ||
* helper. | ||
* | ||
* Strings should be enclosed in 'quotes'. | ||
* Integers should be given literally (without quotes). | ||
* Boolean values may be true or false (never quotes). | ||
* | ||
* PHP Version 7 | ||
*/ | ||
|
||
/* PEAR server name. Only change for testing purposes. */ | ||
$conf['releaseserver'] = 'pear.horde.org'; | ||
|
||
/* PEAR server directory. Only change for testing purposes. */ | ||
$conf['releasedir'] = '/horde/web/pear.horde.org'; | ||
|
||
/* Username for horde.org. | ||
* Make sure you belong to the "horde" group there. */ | ||
$conf['horde_user'] = ''; | ||
|
||
/* Needed to update the Whups versions */ | ||
$conf['horde_pass'] = ''; | ||
|
||
/* From: address for announcements. */ | ||
$conf['from'] = 'Full name <[email protected]>'; | ||
|
||
/* Path to a checkout of the horde-web repository. */ | ||
$conf['web_dir'] = '/var/www/horde-web'; | ||
|
||
/** | ||
* Vendor: Used by the composer, packagist, satis and git-related tasks | ||
* Defaults to 'horde' if unset | ||
*/ | ||
// $conf['vendor'] = 'horde'; | ||
|
||
/** | ||
* Git Repo Base: The base URL for your remote git repo | ||
* Defaults to https://github.com/$vendor if unset | ||
* If you configure this, $vendor will NOT be appended | ||
*/ | ||
//$conf['git_repo_base'] = 'https://git.mycompany.com/level/nextlevel/'; | ||
|
||
/** composer_repo - Type of loader hints to generate | ||
* Default is not to generate any hints. Dependencies will be from packagist | ||
*/ | ||
// generate a vcs repo source per horde internal dependency | ||
// $conf['composer_repo'] = 'vcs'; | ||
// generate a satis source for all horde namespace | ||
$conf['composer_repo'] = 'satis:https://horde-satis.maintaina.com'; | ||
|
||
/** | ||
* composer_version - tweak all dependency versions | ||
* to a common branch name or version | ||
* This is used by the horde-components composer command and | ||
* the composer release task unless overwritten there | ||
* | ||
* Default: Depend on versions from .horde.yml | ||
*/ | ||
// depend on master branch | ||
// $conf['composer_version'] = 'dev-master'; | ||
// depend on a staging branch - components won't check if it even exists! | ||
$conf['composer_version'] = 'dev-FRAMEWORK_6_0'; | ||
|
||
|
||
/* Well known composer native substitutes for pear dependencies */ | ||
$conf['composer_opts']['pear-substitutes'] = [ | ||
['pear.php.net/Archive_Tar' => | ||
['source' => 'Packagist', 'name' => 'pear/archive_tar']], | ||
['pear.php.net/Console_Color2' => | ||
['source' => 'Packagist', 'name' => 'pear/console_color2']], | ||
['pear.php.net/Net_DNS2' => | ||
['source' => 'Packagist', 'name' => 'pear/net_dns2']], | ||
['pear.php.net/Console_Table' => | ||
['source' => 'Packagist', 'name' => 'pear/console_table']], | ||
['pear.php.net/PHP_CodeSniffer' => | ||
['source' => 'Packagist', 'name' => 'squizlabs/php_codesniffer']], | ||
['pear.phpunit.de/phpcpd' => ['source' => 'Packagist', 'name' => 'sebastian/phpcpd']], | ||
['pear.phpunit.de/phpdcd' => ['source' => 'Packagist', 'name' => 'sebastian/phpdcd']], | ||
['pear.phpunit.de/phploc' => ['source' => 'Packagist', 'name' => 'phploc/phploc']] | ||
]; | ||
|
||
/** | ||
* Configure release pipelines | ||
*/ | ||
|
||
/** | ||
* Upstream pipeline | ||
* | ||
* Usage: horde-components path/to/component release for upstream | ||
* | ||
* The upstream pipeline is similar to the original pipeline | ||
* | ||
* Added Steps: | ||
* - checkout of the correct branch, prevent accidental release from master | ||
* - writing an updated composer file | ||
* - Pushing to github | ||
* - Notifying to Packagist | ||
* | ||
* Removed Steps: | ||
* - None | ||
* | ||
*/ | ||
$conf['pipeline']['release']['upstream'] = [ | ||
// Checkout the FRAMEWORK_5_2 branch, don't accidentally release master | ||
['name' => 'GitBranch', 'options' => [ | ||
'git_branch' => 'FRAMEWORK_5_2', | ||
'git_branch_prereq' => false | ||
] | ||
], | ||
['name' => 'Unit'], | ||
['name' => 'Changelog'], | ||
['name' => 'Timestamp'], | ||
['name' => 'CurrentSentinel'], | ||
// By default, upload to Pirum server after generating | ||
['name' => 'Package', 'options' => ['upload' => 'true']], | ||
|
||
// The composer task will use global options like composer_opts, | ||
// composer_version, composer_repo unless explicitly overwritten here | ||
['name' => 'Composer'], | ||
['name' => 'CommitPreRelease'], | ||
['name' => 'TagRelease'], | ||
['name' => 'Announce'], | ||
['name' => 'Website'], | ||
['name' => 'Bugs'], | ||
['name' => 'NextVersion'], | ||
['name' => 'CommitPostRelease'], | ||
['name' => 'GitPush'], | ||
// Nudge Packagist that we have an update | ||
// Requires API key. Does not work for new packages not yet registered. | ||
['name' => 'Packagist', 'options' => [ | ||
'packagist_api_key' => '', | ||
'packagist_user' => 'horde', | ||
'vendor' => 'horde' | ||
] | ||
] | ||
// Optional: A local Satis installation satis.horde.org | ||
// satis_bin: path to satis cli | ||
// satis_json: path to satis json file | ||
// satis_outdir: path where satis should write the repository | ||
// satis_push: If the output dir is a git checkout, try to commit and push? | ||
/* ['name' => 'Satis', 'options' => [ | ||
'satis_bin' => '', | ||
'satis_json' => '', | ||
'satis_outdir' => '', | ||
'satis_push' => true | ||
] | ||
]*/ | ||
]; | ||
|
||
/** | ||
* Downstream pipeline | ||
* | ||
* Usage: horde-components path/to/component release for downstream | ||
* | ||
* The downstream pipeline is for developing horde based code in your own lab | ||
* | ||
* Added Steps: | ||
* - checkout of the correct branch, prevent accidental release from master | ||
* - writing an updated composer file | ||
* - Pushing to github | ||
* - Writing to a satis repository | ||
* | ||
* Removed Steps: | ||
* - Package/Upload (Pear) | ||
* - Announce | ||
* - Website | ||
* - Bugs | ||
* | ||
*/ | ||
$conf['pipeline']['release']['downstream'] = [ | ||
// Ensure we create release from the staging branch. Break if not. | ||
['name' => 'GitBranch', 'options' => [ | ||
'git_branch' => 'staging', | ||
'git_branch_prereq' => true | ||
] | ||
], | ||
['name' => 'Unit'], | ||
['name' => 'Changelog'], | ||
['name' => 'Timestamp'], | ||
['name' => 'CurrentSentinel'], | ||
// Pear related steps have been removed | ||
// The composer task will use global options like composer_opts, | ||
// composer_version, composer_repo unless explicitly overwritten here | ||
['name' => 'Composer', 'options' => ['composer_version' => '' ] ], | ||
['name' => 'CommitPreRelease'], | ||
['name' => 'TagRelease'], | ||
// Increase version numbers for development mode | ||
['name' => 'NextVersion'], | ||
// Force our component to require staging branch dependencies | ||
// This is useful for development mode | ||
['name' => 'Composer', 'options' => ['composer_version' => 'dev-FRAMEWORK_6_0']], | ||
['name' => 'CommitPostRelease'], | ||
['name' => 'GitPush'], | ||
// Our downstream pipeline uses satis rather than packagist | ||
// satis_bin: path to satis cli | ||
// satis_json: path to satis json file | ||
// satis_outdir: path where satis should write the repository | ||
// satis_push: If the output dir is a git checkout, try to commit and push? | ||
['name' => 'Satis', 'options' => [ | ||
'satis_bin' => '', | ||
'satis_json' => '', | ||
'satis_outdir' => '', | ||
'satis_push' => true | ||
] | ||
] | ||
// TODO: Missing a step to update the release branch from the latest tag | ||
]; | ||
|
||
|
||
/** | ||
* Insys pipeline | ||
* | ||
* Usage: horde-components path/to/component release for insysgui | ||
* | ||
* The insysgui pipeline is for developing horde based code insys apps | ||
* | ||
* Added Steps: | ||
* - checkout of the correct branch, prevent accidental release from master | ||
* - writing an updated composer file | ||
* - Pushing to github | ||
* - Writing to a satis repository | ||
* | ||
* Removed Steps: | ||
* - Package/Upload (Pear) | ||
* - Announce | ||
* - Website | ||
* - Bugs | ||
* | ||
*/ | ||
$conf['pipeline']['release']['maintaina'] = [ | ||
// Ensure we create release from the master branch. Break if not. | ||
['name' => 'GitBranch', 'options' => [ | ||
'git_branch' => 'FRAMEWORK_6_0', | ||
'git_branch_prereq' => true | ||
] | ||
], | ||
// no unit tests for now | ||
// ['name' => 'Unit'], | ||
['name' => 'Changelog'], | ||
['name' => 'Timestamp'], | ||
['name' => 'CurrentSentinel'], | ||
['name' => 'Composer'], | ||
['name' => 'CommitPreRelease'], | ||
['name' => 'TagRelease'], | ||
// Increase version numbers for development mode | ||
['name' => 'NextVersion'], | ||
['name' => 'CommitPostRelease'], | ||
// ['name' => 'GitPush'], | ||
]; |