Skip to content

Commit

Permalink
LIVE UPDATES
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoVaranda committed May 7, 2015
1 parent 879ca6e commit ba8012e
Show file tree
Hide file tree
Showing 2,117 changed files with 6,972 additions and 226,101 deletions.
File renamed without changes.
Binary file added public/mez.zip
Binary file not shown.
14 changes: 14 additions & 0 deletions vendor/d11wtq/boris/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Contribution Guidelines

## Rules

There are a few basic ground-rules for contributors:

1. **No `--force` pushes** or modifying the Git history in any way.
2. **External API changes and significant modifications** should be subject to a **pull request** to solicit feedback from other contributors.
3. Use a non-`master` branch for ongoing work.
4. Adhere to existing code style as much as possible.

## Releases

Declaring formal releases remains the prerogative of the project maintainer.
150 changes: 150 additions & 0 deletions vendor/d11wtq/boris/release.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
#!/usr/bin/env php
<?php

/**
* @author Chris Corbyn <[email protected]>
*
* Copyright © 2013-2014 Chris Corbyn.
*/

/* Generate releases in Github */

namespace Boris;

require __DIR__ . '/lib/autoload.php';

$args = getopt('hv:', array(
'help',
'version:'
));

if (count($args) != 1) {
help();
exit(1);
}

foreach ($args as $opt => $value) {
switch ($opt) {
case 'v':
case 'version':
version($value);
exit(0);

case 'h':
case 'help':
help();
exit(0);

default:
unknown($opt);
exit(1);
}
}

function help()
{
echo <<<HELP
Boris release generator script.
Usage:
./release.php --version 1.2 Create a release for v1.2
./release.php --help Display this help message
HELP;
}

function version($newVersion)
{
$token = get_token();
$user = get_user();
$repo = get_repo();
$oldVersion = Boris::VERSION;
$phar = "boris.phar";

printf("Building version v%s...\n", $newVersion);

printf(" Updating Boris::VERSION (%s) to %s...\n", $oldVersion, $newVersion);
`perl -pi -e 's/$oldVersion/$newVersion/' lib/Boris/Boris.php README.md`;

printf(" Committing changes...\n");
`git commit -am "Version bump to $newVersion"`;

printf(" Pushing changes upstream...\n");
`git push`;

printf(" Creating tag v%s...\n", $newVersion);
`git tag -a "v$newVersion" -m "Auto-generated tag"`;

printf(" Pushing tags upstream...\n");
`git push --tags`;

printf(" Creating release on github...\n");
$response = `curl \
-sL \
-XPOST \
-H "Authorization: token $token" \
--data-binary '{"tag_name":"v$newVersion"}' \
https://api.github.com/repos/$user/$repo/releases`;

$json = json_decode($response, true);
$id = $json['id'];

if (empty($id)) {
printf("Failed.\n");
printf("%s\n", $response);
exit(1);
}

printf(" Building phar...\n");
`box build`;

printf("Uploading phar to GitHub...\n");
`curl -XPOST \
-sL \
-H "Authorization: token $token" \
-H "Content-Type: application/octet-stream" \
--data-binary @$phar \
https://uploads.github.com/repos/$user/$repo/releases/$id/assets?name=$phar`;

printf("Done.\n");
}

function get_token()
{
if (getenv('GITHUB_TOKEN')) {
return getenv('GITHUB_TOKEN');
} else {
printf("Missing environment variable \$GITHUB_TOKEN\n");
exit(1);
}
}

function get_origin()
{
$remotes = `git remote -v`;
if (!preg_match('/^origin\s+(\S*?.git)\s+\(push\)/m', $remotes, $matches)) {
printf("Unable to find origin in $remotes\n");
exit(1);
}
return $matches[1];
}

function get_user()
{
$origin = get_origin();
if (!preg_match('#^.*?[/:]([^/]+)/([^/]+)\.git$#', $origin, $matches)) {
printf("Don't know how to parse $origin\n");
exit(1);
}
return $matches[1];
}

function get_repo()
{
$origin = get_origin();
if (!preg_match('#^.*?[/:]([^/]+)/([^/]+)\.git$#', $origin, $matches)) {
printf("Don't know how to parse $origin\n");
exit(1);
}
return $matches[2];
}
20 changes: 0 additions & 20 deletions vendor/league/flysystem/src/PluginInterface.php

This file was deleted.

88 changes: 0 additions & 88 deletions vendor/league/flysystem/src/ReadInterface.php

This file was deleted.

10 changes: 0 additions & 10 deletions vendor/league/flysystem/src/RootViolationException.php

This file was deleted.

Loading

0 comments on commit ba8012e

Please sign in to comment.