-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
up: update kite deps update script logic
- Loading branch information
Showing
7 changed files
with
142 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Inhere\Kite\Console\SubCmd\ToolCmd; | ||
|
||
use Inhere\Console\Command; | ||
use Inhere\Console\IO\Input; | ||
use Inhere\Console\IO\Output; | ||
|
||
/** | ||
* class LnCommand | ||
* | ||
* @author inhere | ||
*/ | ||
class LnCommand extends Command | ||
{ | ||
protected static string $name = 'ln'; | ||
protected static string $desc = 'quick create ln link'; | ||
|
||
protected function configure(): void | ||
{ | ||
$this->flags->addArgByRule('name', 'show the tool detail info by name'); | ||
// $this->flags->addOpt('show', 's', 'show the tool info', 'bool'); | ||
// $this->flags->addOpt('list', 'l', 'list all can be installed tools', 'bool'); | ||
} | ||
|
||
protected function execute(Input $input, Output $output) | ||
{ | ||
|
||
$output->info('TODO'); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
|
||
return [ | ||
'app' => [ | ||
'rootPath' => BASE_PATH, | ||
], | ||
'logger' => [ | ||
'name' => 'Kite', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env bash | ||
|
||
# run: kite run --proxy upinit-kite-dev-deps.sh | ||
# run: bash script/upinit-kite-dev-deps.sh | ||
set -e | ||
|
||
# proxy_on | ||
kiteDir=~/.kite | ||
ghHost=https://github.com | ||
cd $kiteDir | ||
|
||
# create array | ||
groups=(inhere phppkg toolkit) | ||
|
||
echo "Update kite dev depends packages." | ||
for dir in "${groups[@]}"; do | ||
echo "- ✅ Update the vendor/$dir" | ||
|
||
ghGrp=$dir | ||
if [ "$dir" == "toolkit" ]; then | ||
ghGrp="php-$dir" | ||
fi | ||
|
||
pDir=$kiteDir/vendor/$dir | ||
for path in "$pDir"/*; do | ||
pkg=$(basename "$path") | ||
|
||
ghPkg=$pkg | ||
if [[ "$pkg" == "console" ]]; then | ||
ghPkg="php-$pkg" | ||
elif [ "$pkg" == "sroute" ]; then | ||
ghPkg="php-srouter" | ||
fi | ||
|
||
echo " - package: $dir/$pkg" | ||
if [ -d "$path"/.git ]; then | ||
echo " founded the .git dir, do update" | ||
echo " into $path" | ||
cd "$path" | ||
echo " update by git pull" | ||
git pull | ||
else | ||
echo " not found .git dir, do clone" | ||
echo " goto $pDir" | ||
cd "$pDir" | ||
echo " remove old package dir" | ||
rm -rf "$path" | ||
echo " git clone $ghHost/$ghGrp/$ghPkg $pkg" | ||
git clone "$ghHost/$ghGrp/$ghPkg" "$pkg" | ||
fi | ||
done | ||
done | ||
|
||
echo "🟢 Completed" |