Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: PhpGt/Sync
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.2.9
Choose a base ref
...
head repository: PhpGt/Sync
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 5 commits
  • 19 files changed
  • 1 contributor

Commits on Jul 1, 2022

  1. Copy the full SHA
    9c34693 View commit details

Commits on Sep 6, 2022

  1. maintenance: dependabot (#22)

    closes #21
    g105b authored Sep 6, 2022
    Copy the full SHA
    4760d50 View commit details

Commits on Jul 4, 2023

  1. Upgrade CI (#53)

    * build: upgrade dependencies
    
    * build: upgrade dependencies to new versions
    
    * test: satisfy mess detector
    
    * ci: upgrade ci
    
    * ci: remove scrutinizer
    g105b authored Jul 4, 2023
    Copy the full SHA
    0313521 View commit details

Commits on Jul 6, 2023

  1. Symlinks (#55)

    * build: upgrade dependencies
    
    * build: upgrade dependencies to new versions
    
    * test: satisfy mess detector
    
    * ci: upgrade ci
    
    * ci: remove scrutinizer
    
    * test: create testbed for new functionality of #51
    
    * feature: sync sym links
    closes #51
    g105b authored Jul 6, 2023
    Copy the full SHA
    5764001 View commit details

Commits on Jul 7, 2023

  1. Symlink improvement (#57)

    * build: upgrade dependencies
    
    * build: upgrade dependencies to new versions
    
    * test: satisfy mess detector
    
    * ci: upgrade ci
    
    * ci: remove scrutinizer
    
    * test: create testbed for new functionality of #51
    
    * feature: sync sym links
    closes #51
    
    * wip: symlink source uses real path
    for #56
    
    * feature: improve handling of symlinks
    closes #56
    
    * feature: do not mention skipped links
    
    * tweak: split long line
    g105b authored Jul 7, 2023
    Copy the full SHA
    5d1ee6a View commit details
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
ignore:
- dependency-name: phpunit/phpunit
update-types: ["version-update:semver-patch"]
- dependency-name: phpstan/phpstan
update-types: ["version-update:semver-patch"]
126 changes: 115 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -5,33 +5,45 @@ on: [push]
jobs:
composer:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ 8.0, 8.1, 8.2 ]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Cache Composer dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}

- uses: php-actions/composer@v6
- name: Composer install
uses: php-actions/composer@v6
with:
php_version: ${{ matrix.php }}

- name: Archive build
run: mkdir /tmp/github-actions/ && tar -cvf /tmp/github-actions/build.tar ./

- name: Upload build archive for test runners
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: build-artifact
path: /tmp/github-actions

phpunit:
runs-on: ubuntu-latest
needs: [composer]
needs: [ composer ]
strategy:
matrix:
php: [ 8.0, 8.1, 8.2 ]

outputs:
coverage: ${{ steps.store-coverage.outputs.coverage_text }}

steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: build-artifact
path: /tmp/github-actions
@@ -41,18 +53,47 @@ jobs:

- name: PHP Unit tests
uses: php-actions/phpunit@v3
env:
XDEBUG_MODE: cover
with:
php_version: 8.0
php_version: ${{ matrix.php }}
php_extensions: xdebug
configuration: test/phpunit/phpunit.xml
bootstrap: vendor/autoload.php
coverage_text: _coverage/coverage.txt
coverage_clover: _coverage/clover.xml

- name: Store coverage data
uses: actions/upload-artifact@v3
with:
name: code-coverage
path: _coverage

coverage:
runs-on: ubuntu-latest
needs: [ phpunit ]

steps:
- uses: actions/checkout@v3

- uses: actions/download-artifact@v3
with:
name: code-coverage
path: _coverage

- name: Output coverage
run: cat "_coverage/coverage.txt"

- name: Upload to Codecov
uses: codecov/codecov-action@v3

phpstan:
runs-on: ubuntu-latest
needs: [composer]
needs: [ composer ]
strategy:
matrix:
php: [ 8.0, 8.1, 8.2 ]

steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: build-artifact
path: /tmp/github-actions
@@ -63,4 +104,67 @@ jobs:
- name: PHP Static Analysis
uses: php-actions/phpstan@v3
with:
php_version: ${{ matrix.php }}
path: src/

phpmd:
runs-on: ubuntu-latest
needs: [ composer ]
strategy:
matrix:
php: [ 8.0, 8.1, 8.2 ]

steps:
- uses: actions/download-artifact@v3
with:
name: build-artifact
path: /tmp/github-actions

- name: Extract build archive
run: tar -xvf /tmp/github-actions/build.tar ./

- name: PHP Mess Detector
uses: php-actions/phpmd@v1
with:
php_version: ${{ matrix.php }}
path: src/
output: text
ruleset: phpmd.xml

phpcs:
runs-on: ubuntu-latest
needs: [ composer ]
strategy:
matrix:
php: [ 8.0, 8.1, 8.2 ]

steps:
- uses: actions/download-artifact@v3
with:
name: build-artifact
path: /tmp/github-actions

- name: Extract build archive
run: tar -xvf /tmp/github-actions/build.tar ./

- name: PHP Code Sniffer
uses: php-actions/phpcs@v1
with:
php_version: ${{ matrix.php }}
path: src/
standard: phpcs.xml

remove_old_artifacts:
runs-on: ubuntu-latest

steps:
- name: Remove old artifacts for prior workflow runs on this repository
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api "/repos/${{ github.repository }}/actions/artifacts?name=build-artifact" | jq ".artifacts[] | select(.name == \"build-artifact\") | .id" > artifact-id-list.txt
while read id
do
echo -n "Deleting artifact ID $id ... "
gh api --method DELETE /repos/${{ github.repository }}/actions/artifacts/$id && echo "Done"
done <artifact-id-list.txt
32 changes: 0 additions & 32 deletions .scrutinizer.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -8,10 +8,10 @@ Synchronise two directories.
<a href="https://github.com/PhpGt/Sync/actions" target="_blank">
<img src="https://badge.status.php.gt/sync-build.svg" alt="Build status" />
</a>
<a href="https://scrutinizer-ci.com/g/PhpGt/Sync" target="_blank">
<a href="https://app.codacy.com/gh/PhpGt/Sync" target="_blank">
<img src="https://badge.status.php.gt/sync-quality.svg" alt="Code quality" />
</a>
<a href="https://scrutinizer-ci.com/g/PhpGt/Sync" target="_blank">
<a href="https://app.codecov.io/gh/PhpGt/Sync" target="_blank">
<img src="https://badge.status.php.gt/sync-coverage.svg" alt="Code coverage" />
</a>
<a href="https://packagist.org/packages/PhpGt/Sync" target="_blank">
@@ -48,4 +48,4 @@ Features
+ Cross-platform compatible directory synchronisation (Linux, Windows, Mac).
+ Selective sync through glob matches (only sync js files within script directory with `/script/**/*.js`).
+ Get statistics of copied/deleted/skipped files after sync execution.
+ Low memory footprint.
+ Low memory footprint.
1 change: 0 additions & 1 deletion bin/sync
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env php
<?php

use Gt\Cli\Argument\CommandArgumentList;
use Gt\Sync\Command\SyncCommand;
use Gt\Cli\Application;
8 changes: 5 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -4,13 +4,15 @@

"require": {
"php": ">=8.0",
"phpgt/cli": "1.3.*",
"phpgt/cli": "^1.3",
"webmozart/glob": "4.4.*"
},

"require-dev": {
"phpunit/phpunit": "^9.5",
"phpstan/phpstan": "^0.12"
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.1",
"phpmd/phpmd": "^2.13",
"squizlabs/php_codesniffer": "^3.7"
},

"autoload": {
Loading