Skip to content

Commit f0acff9

Browse files
committed
COMOPS-129: Extract SVC code into its own repo
1 parent 8af339e commit f0acff9

File tree

217 files changed

+14187
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+14187
-1
lines changed

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/vendor
2+
/.idea

Diff for: README.md

+20-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,20 @@
1-
# magento-semver
1+
# Magento Semantic Version Checker
2+
3+
## Installation
4+
5+
- `git clone [email protected]:magento/magento-semver.git`
6+
- `cd magento-semver`
7+
- `composer install`
8+
9+
*Note:* package `magento/framework` is hosted on `repo.magento.com`, so Composer keys need to be added to `auth.json` or configured globally.
10+
*ToDo:* get rid of this dependency.
11+
12+
## Usage
13+
- `php bin/svc --help`
14+
15+
### Commands
16+
- `php bin/svc compare` - Compare a set of files to determine what semantic versioning change needs to be done.
17+
- `php bin/svc update-breaking-changes` - Update the file with a list of backward incompatible changes between two sources.
18+
19+
## Tests
20+
- `vendor/bin/phpunit -c tests/Unit/phpunit.xml.dist`

Diff for: auth.json.sample

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"http-basic": {
3+
"repo.magento.com": {
4+
"username": "<public-key>",
5+
"password": "<private-key>"
6+
}
7+
}
8+
}

Diff for: bin/svc

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env php
2+
<?php
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
require __DIR__ . '/../vendor/autoload.php';
8+
9+
use Symfony\Component\Console\Application;
10+
use Magento\SemanticVersionChecker\Console\Command\BackwardIncompatibleChangesCommand;
11+
use Magento\SemanticVersionChecker\Console\Command\CompareSourceCommand;
12+
13+
if (PHP_SAPI !== 'cli') {
14+
echo 'Command "bin/svc" must be run as a CLI application.' . PHP_EOL;
15+
exit(1);
16+
}
17+
18+
try {
19+
$application = new Application();
20+
$application->add(new BackwardIncompatibleChangesCommand());
21+
$application->add(new CompareSourceCommand());
22+
$application->run();
23+
} catch (\Exception $e) {
24+
while ($e) {
25+
echo $e->getMessage();
26+
echo $e->getTraceAsString();
27+
echo "\n\n";
28+
$e = $e->getPrevious();
29+
}
30+
exit(1);
31+
}

Diff for: composer.json

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "magento/magento-semver",
3+
"description": "Magento semantic version checker",
4+
"version": "1.0.0",
5+
"license": [
6+
"OSL-3.0",
7+
"AFL-3.0"
8+
],
9+
"require": {
10+
"php": "~7.1.3||~7.2.0",
11+
"tomzx/php-semver-checker": "^0.13.0",
12+
"symfony/console": "~4.1.0",
13+
"nikic/php-parser": "^3.1.0",
14+
"magento/framework": "~102.0.0"
15+
},
16+
"require-dev": {
17+
"phpunit/phpunit": "^6.5.0",
18+
"allure-framework/allure-phpunit": "^1.2.0"
19+
},
20+
"autoload": {
21+
"psr-4": {
22+
"Magento\\SemanticVersionChecker\\": "src/"
23+
}
24+
},
25+
"repositories": [
26+
{
27+
"type": "composer",
28+
"url": "https://repo.magento.com/"
29+
}
30+
]
31+
}

0 commit comments

Comments
 (0)