Skip to content

Commit

Permalink
[#77] Replaced logger with Monolog.
Browse files Browse the repository at this point in the history
  • Loading branch information
tannguyen04 authored Mar 29, 2024
1 parent 22c667c commit fb3d760
Show file tree
Hide file tree
Showing 11 changed files with 237 additions and 225 deletions.
20 changes: 10 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ jobs:
[email protected]:drevops/git-artifact-destination.git \
--branch=mode--force-push--circleci--[branch] \
--mode=force-push \
--report=$HOME/report--mode--force-push.txt \
--log=$HOME/report--mode--force-push.txt \
--push \
--debug
-vvv
DEPLOYED_BRANCH=$(sed -n 's/Remote branch://p' $HOME/report--mode--force-push.txt | sed 's/ //g')
echo "Deployed to $DEPLOYED_BRANCH"
Expand All @@ -121,9 +121,9 @@ jobs:
[email protected]:drevops/git-artifact-destination.git \
--branch=mode--force-push--circleci--[branch] \
--mode=force-push \
--report=$HOME/report--mode--force-push.txt \
--log=$HOME/report--mode--force-push.txt \
--push \
--debug
-vvv
DEPLOYED_BRANCH=$(sed -n 's/Remote branch://p' $HOME/report--mode--force-push.txt | sed 's/ //g')
echo "Deployed to $DEPLOYED_BRANCH"
Expand Down Expand Up @@ -170,9 +170,9 @@ jobs:
[email protected]:drevops/git-artifact-destination.git \
--branch=mode--branch--circleci--[branch]--[timestamp:Y-m-d_H-i] \
--mode=branch \
--report=$HOME/report--mode--branch.txt \
--log=$HOME/report--mode--branch.txt \
--push \
--debug
-vvv
DEPLOYED_BRANCH=$(sed -n 's/Remote branch://p' $HOME/report--mode--branch.txt | sed 's/ //g')
echo "Deployed to $DEPLOYED_BRANCH"
Expand All @@ -187,9 +187,9 @@ jobs:
[email protected]:drevops/git-artifact-destination.git \
--branch=mode--branch--circleci--[branch]--[timestamp:Y-m-d_H-i] \
--mode=branch \
--report=$HOME/report--mode--branch.txt \
--log=$HOME/report--mode--branch.txt \
--push \
--debug \
-vvv \
&& { echo "Expected to fail as repeated pushes to the same branch are not allowed, but succeeded" >&2; exit 1; } || echo "Failed as expected"
- run:
Expand All @@ -207,9 +207,9 @@ jobs:
[email protected]:drevops/git-artifact-destination.git \
--branch=mode--branch--circleci--[branch]--[timestamp:Y-m-d_H-i-s] \
--mode=branch \
--report=$HOME/report--mode--branch.txt \
--log=$HOME/report--mode--branch.txt \
--push \
--debug
-vvv
DEPLOYED_BRANCH=$(sed -n 's/Remote branch://p' $HOME/report--mode--branch.txt | sed 's/ //g')
echo "Deployed to $DEPLOYED_BRANCH"
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/test-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ jobs:
[email protected]:drevops/git-artifact-destination.git \
--branch=mode--force-push--gha--[branch] \
--mode=force-push \
--report=$HOME/report--mode--force-push.txt \
--log=$HOME/report--mode--force-push.txt \
--push \
--debug
-vvv
DEPLOYED_BRANCH=$(sed -n 's/Remote branch://p' $HOME/report--mode--force-push.txt | sed 's/ //g')
echo "Deployed to $DEPLOYED_BRANCH"
Expand All @@ -181,9 +181,9 @@ jobs:
[email protected]:drevops/git-artifact-destination.git \
--branch=mode--force-push--gha--[branch] \
--mode=force-push \
--report=$HOME/report--mode--force-push.txt \
--log=$HOME/report--mode--force-push.txt \
--push \
--debug
-vvv
DEPLOYED_BRANCH=$(sed -n 's/Remote branch://p' $HOME/report--mode--force-push.txt | sed 's/ //g')
echo "Deployed to $DEPLOYED_BRANCH"
Expand Down Expand Up @@ -260,9 +260,9 @@ jobs:
[email protected]:drevops/git-artifact-destination.git \
--branch=mode--branch--gha--[branch]--[timestamp:Y-m-d_H-i] \
--mode=branch \
--report=$HOME/report--mode--branch.txt \
--log=$HOME/report--mode--branch.txt \
--push \
--debug
-vvv
DEPLOYED_BRANCH=$(sed -n 's/Remote branch://p' $HOME/report--mode--branch.txt | sed 's/ //g')
echo "Deployed to $DEPLOYED_BRANCH"
Expand All @@ -283,9 +283,9 @@ jobs:
[email protected]:drevops/git-artifact-destination.git \
--branch=mode--branch--gha--[branch]--[timestamp:Y-m-d_H-i] \
--mode=branch \
--report=$HOME/report--mode--branch.txt \
--log=$HOME/report--mode--branch.txt \
--push \
--debug \
-vvv \
&& { echo "Expected to fail as repeated pushes to the same branch are not allowed, but succeeded" >&2; exit 1; } || echo "Failed as expected"
- name: Deployment 2 - new branch
Expand All @@ -294,9 +294,9 @@ jobs:
[email protected]:drevops/git-artifact-destination.git \
--branch=mode--branch--gha--[branch]--[timestamp:Y-m-d_H-i-s] \
--mode=branch \
--report=$HOME/report--mode--branch.txt \
--log=$HOME/report--mode--branch.txt \
--push \
--debug
-vvv
DEPLOYED_BRANCH=$(sed -n 's/Remote branch://p' $HOME/report--mode--branch.txt | sed 's/ //g')
echo "Deployed to $DEPLOYED_BRANCH"
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ fully-configured [example in the DrevOps project](https://github.com/drevops/dre
--no-cleanup Do not cleanup after run.
--now=NOW Internal value used to set internal time.
--push Push artifact to the remote repository. Defaults to FALSE.
--report=REPORT Path to the report file.
--log=LOG Path to the log/report file.
--root=ROOT Path to the root for file path resolution. If not specified, current directory is used.
--show-changes Show changes made to the repo by the build in the output.
--src=SRC Directory where source repository is located. If not specified, root directory is used.
Expand All @@ -144,9 +144,6 @@ fully-configured [example in the DrevOps project](https://github.com/drevops/dre
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
--simulate Run in simulated mode (show what would have happened).
--progress-delay=PROGRESS-DELAY Number of seconds before progress bar is displayed in long-running task collections. Default: 2s. [default: 2]
-D, --define=DEFINE Define a configuration item value. (multiple values allowed)
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"symfony/filesystem": "^6",
"symfony/finder": "^6",
"czproject/git-php": "^4.2",
"symfony/process": "^6"
"symfony/process": "^6",
"symfony/monolog-bridge": "^6"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8",
Expand Down Expand Up @@ -52,7 +53,7 @@
"lint": [
"phpcs",
"phpmd --exclude vendor,vendor-bin,node_modules . text phpmd.xml",
"phpstan",
"phpstan --memory-limit=-1",
"rector --clear-cache --dry-run"
],
"lint-fix": [
Expand Down
Loading

0 comments on commit fb3d760

Please sign in to comment.