forked from yiisoft/yii-auth-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathm.bat
More file actions
111 lines (97 loc) · 2.56 KB
/
m.bat
File metadata and controls
111 lines (97 loc) · 2.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
@echo off
:: This batch script provides a menu to run common commands for the Auth Client project.
:: Ensure that the file is saved in Windows (CRLF) format e.g. Netbeans bottom right corner
title Auth Client Command Menu
cd /d "%~dp0"
:menu
cls
echo =======================================
echo Auth Client SYSTEM MENU
echo =======================================
echo [1] Run PHP Psalm
echo [2] Run PHP Psalm on a Specific File
echo [2a] Clear Psalm's cache (in the event of stubborn errors)
echo [3] Check Composer Outdated
echo [3a] Composer why-not {repository eg. yiisoft/yii-demo} {patch/minor version e.g. 1.1.1}
echo [4] Run Composer Update
echo [5] Run Composer Require Checker
echo [5a] Run Rector See Potential Changes
echo [5b] Run Rector Make Changes
echo [6] Exit
echo [7] Exit to Current Directory
echo =======================================
set /p choice="Enter your choice [1-7]: "
if "%choice%"=="1" goto psalm
if "%choice%"=="2" goto psalm_file
if "%choice%"=="2a" goto psalm_clear_cache
if "%choice%"=="3" goto outdated
if "%choice%"=="3a" goto composerwhynot
if "%choice%"=="4" goto composer_update
if "%choice%"=="5" goto require_checker
if "%choice%"=="5a" goto rector_see_changes
if "%choice%"=="5b" goto rector_make_changes
if "%choice%"=="6" goto exit
if "%choice%"=="7" goto exit_to_directory
echo Invalid choice. Please try again.
pause
goto menu
:psalm
echo Running PHP Psalm...
php vendor/bin/psalm
pause
goto menu
:psalm_file
echo Running PHP Psalm on a specific file...
set /p file="Enter the path to the file (relative to the project root): "
if "%file%"=="" (
echo No file specified. Returning to the menu.
pause
goto menu
)
php vendor/bin/psalm "%file%"
pause
goto menu
:psalm_clear_cache
echo Running PHP Psalm...
php vendor/bin/psalm --clear-cache
pause
goto menu
:outdated
echo Checking Composer Outdated...
composer outdated
pause
goto menu
:composerwhynot
@echo off
set /p repo="Enter the package name (e.g. vendor/package): "
set /p version="Enter the version (e.g. 1.0.0): "
composer why-not %repo% %version%
pause
goto menu
:require_checker
echo Running Composer Require Checker...
php vendor/bin/composer-require-checker
pause
goto menu
:rector_see_changes
echo See changes that Rector Proposes
php vendor/bin/rector process --dry-run
pause
goto menu
:rector_make_changes
echo Make changes that Rector Proposed
php vendor/bin/rector
pause
goto menu
:composer_update
echo Running Composer Update...
composer update
pause
goto menu
:exit_to_directory
echo Returning to the current directory. Goodbye!
cmd
:exit
echo Exiting. Goodbye!
pause
exit