feat: init scripts

This commit is contained in:
李东云
2021-11-29 16:48:20 +08:00
parent 454426548c
commit 30de62841b
10 changed files with 56 additions and 11 deletions

View File

@@ -0,0 +1,7 @@
#!/usr/bin/env sh
export name
export email
git config --global user.email "${email}"
git config --global user.name "${name}"

View File

@@ -0,0 +1,3 @@
alias ll='ls $LS_OPTIONS -l --color=auto' 2>/dev/null
alias l.='ls $LS_OPTIONS -d .* --color=auto' 2>/dev/null
alias ls='ls $LS_OPTIONS --color=auto' 2>/dev/null

View File

@@ -0,0 +1,6 @@
#!/usr/bin/env bash
chmod -R 700 ~/.ssh
#chmod 600 ~/.ssh/authorized_keys
#chown -R git:git ~/.ssh

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env sh
docker login harbor.luxcreo.cn -u php -p fTr6oVvqqdzVlYgnZhRPPAP54u7SmqGA
image_name=harbor.luxcreo.cn/php/composer-template
docker build --tag $image_name .
#docker push $image_name
#docker push ${image_name}-dev

View File

@@ -0,0 +1,9 @@
#!/usr/bin/env sh
docker run \
-ti --rm --name "composer-template" \
-w "/srv/www" \
-v "$(pwd)":/srv/www \
-v ~/.ssh:/root/.ssh \
-p 8866:80 \
php:cli-alpine /bin/ash

View File

@@ -0,0 +1,4 @@
docker login harbor.luxcreo.cn -u admin -p Mao+690629
set image_name=composer-template
docker build --force-rm=true --target cd --tag %image_name% --target dev --tag %image_name%-dev .

View File

@@ -0,0 +1,11 @@
@echo off
for /F %%i in ('chdir') do ( set current_dir=%%i)
docker run ^
-ti --rm --name "composer-template" ^
-v "%current_dir%":"/srv/www" ^
-v "%USERPROFILE%\.ssh":"/root/.ssh" ^
-p 8866:80 ^
--env-file=.env ^
php:cli-alpine /bin/ash

2
scripts/win/prettier.bat Normal file
View File

@@ -0,0 +1,2 @@
if "%*"=="" (echo <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD>͸<EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>/<2F>ļ<EFBFBD><C4BC><EFBFBD> & exit 1) else .\vendor\bin\phpcs.bat %* || echo. & echo <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E2A3AC><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ctrl-c ȡ<><C8A1> & pause &.\vendor\bin\phpcbf %* && echo <20><>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
::@echo off ::<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><CFB7>ھ<EFBFBD><DABE>׻ᱨ<D7BB><E1B1A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֪<EFBFBD><D6AA>ɶԭ<C9B6><D4AD>

6
scripts/win/readme.md Normal file
View File

@@ -0,0 +1,6 @@
# Windows 系统常用脚本
## 格式化
```bat
.\scripts\win\prettier.bat .\application\alpha.php
```