Create-Shortcut
This commit is contained in:
parent
ca79ea6114
commit
32462802f0
@ -1,12 +1,11 @@
|
|||||||
echo off
|
@echo off
|
||||||
L:
|
G:
|
||||||
cd L:\Git
|
mkdir "%~1.git"
|
||||||
mkdir "%1.git"
|
cd "%~1.git"
|
||||||
cd "%1.git"
|
|
||||||
git init --bare
|
git init --bare
|
||||||
git config core.logAllRefUpdates "true"
|
git config core.logAllRefUpdates "true"
|
||||||
cd ..
|
cd ..
|
||||||
echo Use WinSCP to copy (okay to keep) the %1.git directory to /srv/git. Then click return when done
|
echo Use WinSCP to copy (okay to keep) the %~1.git directory to /srv/git. Then click return when done
|
||||||
@pause
|
@pause
|
||||||
echo sudo -i
|
echo sudo -i
|
||||||
echo 4hink
|
echo 4hink
|
||||||
@ -16,22 +15,23 @@ echo exit
|
|||||||
echo exit
|
echo exit
|
||||||
echo Run the above command in putty. Then click return when done
|
echo Run the above command in putty. Then click return when done
|
||||||
"C:\Program Files\PuTTY\putty.exe" -ssh unity4@192.168.0.73 -pw 4hink
|
"C:\Program Files\PuTTY\putty.exe" -ssh unity4@192.168.0.73 -pw 4hink
|
||||||
git clone git@192.168.0.73:/srv/git/%1.git
|
git clone git@192.168.0.73:/srv/git/%~1.git
|
||||||
cd "%1"
|
y "G:\VS-Code-Settings\Visual Studio Settings\.editorconfig" "G:\%~1\.editorconfig"
|
||||||
copy "L:\Git\VS-Code-Settings\Visual Studio Settings\.editorconfig" "L:\Git\%1\.editorconfig"
|
dotnet new gitignore --force
|
||||||
dotnet new gitignore
|
dotnet new tool-manifest --force
|
||||||
dotnet new tool-manifest
|
|
||||||
dotnet tool install Husky
|
dotnet tool install Husky
|
||||||
dotnet tool restore
|
dotnet tool restore
|
||||||
dotnet husky install
|
dotnet husky install
|
||||||
dotnet husky add pre-commit
|
REM dotnet husky add pre-commit
|
||||||
echo {"scripts": {}}>package.json
|
copy "G:\VS-Code-Settings\Git\pre-commit" "G:\%~1\.husky\pre-commit"
|
||||||
|
copy "G:\VS-Code-Settings\Git\task-runner.json" "G:\%~1\.husky\task-runner.json"
|
||||||
|
copy "G:\VS-Code-Settings\Git\package.json" "G:\%~1\package.json"
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Initial Commit"
|
git commit -m "Initial Commit"
|
||||||
git push origin master
|
git push origin master
|
||||||
git fetch
|
git fetch
|
||||||
git push -u origin master
|
git push -u origin master
|
||||||
git remote add mestsa003 "\\mestsa003.infineon.com\Git\%1.git"
|
git remote add mestsa003 "\\mestsa003.infineon.com\Git\%~1.git"
|
||||||
git push mestsa003 master
|
git push mestsa003 master
|
||||||
code .
|
code .
|
||||||
exit
|
exit
|
6
Git/Create-Shortcut.vbs
Normal file
6
Git/Create-Shortcut.vbs
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
Set oWS = WScript.CreateObject("WScript.Shell")
|
||||||
|
sLinkFile = "mestsa003 - " + WScript.Arguments.Item(0) + ".lnk"
|
||||||
|
Set oLink = oWS.CreateShortcut(sLinkFile)
|
||||||
|
oLink.TargetPath = "G:\VS-Code-Settings\Git\mestsa003.bat"
|
||||||
|
oLink.Arguments = WScript.Arguments.Item(0)
|
||||||
|
oLink.Save
|
@ -1,27 +1,27 @@
|
|||||||
L:
|
@echo off
|
||||||
cd L:\Git
|
G:
|
||||||
mkdir "%1.git"
|
mkdir "%~1.git"
|
||||||
cd "%1.git"
|
cd "%~1.git"
|
||||||
git init --bare
|
git init --bare
|
||||||
git config core.logAllRefUpdates "true"
|
git config core.logAllRefUpdates "true"
|
||||||
cd ..
|
cd ..
|
||||||
robocopy /E /MOVE "%1.git" "\\mestsa003.infineon.com\Git\%1.git"
|
robocopy /E "%~1.git" "\\mestsa003.infineon.com\Git\%~1.git"
|
||||||
cd "%1"
|
cd "%~1"
|
||||||
git init
|
git init
|
||||||
git rev-parse --git-dir
|
git rev-parse --git-dir
|
||||||
git fetch
|
git fetch
|
||||||
git remote --verbose
|
git remote --verbose
|
||||||
git config --get commit.template
|
git remote add origin "\\mestsa003.infineon.com\Git\%~1.git"
|
||||||
git config --local branch.master.github-pr-owner-number
|
copy "G:\VS-Code-Settings\Visual Studio Settings\.editorconfig" "G:\%~1\.editorconfig"
|
||||||
git remote add origin "\\mestsa003.infineon.com\Git\%1.git"
|
dotnet new gitignore --force
|
||||||
copy "L:\Git\VS-Code-Settings\Visual Studio Settings\.editorconfig" "L:\Git\%1\.editorconfig"
|
dotnet new tool-manifest --force
|
||||||
dotnet new gitignore
|
|
||||||
dotnet new tool-manifest
|
|
||||||
dotnet tool install Husky
|
dotnet tool install Husky
|
||||||
dotnet tool restore
|
dotnet tool restore
|
||||||
dotnet husky install
|
dotnet husky install
|
||||||
dotnet husky add pre-commit
|
REM dotnet husky add pre-commit
|
||||||
echo {"scripts": {}}>package.json
|
copy "G:\VS-Code-Settings\Git\pre-commit" "G:\%~1\.husky\pre-commit"
|
||||||
|
copy "G:\VS-Code-Settings\Git\task-runner.json" "G:\%~1\.husky\task-runner.json"
|
||||||
|
copy "G:\VS-Code-Settings\Git\package.json" "G:\%~1\package.json"
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Initial Commit"
|
git commit -m "Initial Commit"
|
||||||
git push origin master
|
git push origin master
|
||||||
|
9
Git/package.json
Normal file
9
Git/package.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"scripts": {
|
||||||
|
"prepare": "dotnet tool restore && dotnet husky install",
|
||||||
|
"pre-commit": "dotnet husky run --group \"pre-commit\"",
|
||||||
|
"build": "dotnet build --runtime win-x64 --self-contained",
|
||||||
|
"pull": "git pull",
|
||||||
|
"garbage-collect": "git gc"
|
||||||
|
}
|
||||||
|
}
|
22
Git/pre-commit
Normal file
22
Git/pre-commit
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
## husky task runner examples -------------------
|
||||||
|
## Note : for local installation use 'dotnet' prefix. e.g. 'dotnet husky'
|
||||||
|
|
||||||
|
## run all tasks
|
||||||
|
#husky run
|
||||||
|
|
||||||
|
### run all tasks with group: 'group-name'
|
||||||
|
#husky run --group group-name
|
||||||
|
|
||||||
|
## run task with name: 'task-name'
|
||||||
|
#husky run --name task-name
|
||||||
|
|
||||||
|
## pass hook arguments to task
|
||||||
|
#husky run --args "$1" "$2"
|
||||||
|
|
||||||
|
## or put your custom commands -------------------
|
||||||
|
#echo 'Husky.Net is awesome!'
|
||||||
|
|
||||||
|
dotnet husky run --group "pre-commit"
|
18
Git/task-runner.json
Normal file
18
Git/task-runner.json
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"group": "pre-commit",
|
||||||
|
"name": "dotnet-format",
|
||||||
|
"command": "dotnet",
|
||||||
|
"args": [
|
||||||
|
"format",
|
||||||
|
"--report",
|
||||||
|
".vscode",
|
||||||
|
"--verbosity",
|
||||||
|
"detailed",
|
||||||
|
"--severity",
|
||||||
|
"error"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -114,9 +114,9 @@ csharp_style_deconstructed_variable_declaration = false
|
|||||||
csharp_style_implicit_object_creation_when_type_is_apparent = true:warning
|
csharp_style_implicit_object_creation_when_type_is_apparent = true:warning
|
||||||
csharp_style_inlined_variable_declaration = false
|
csharp_style_inlined_variable_declaration = false
|
||||||
csharp_style_pattern_local_over_anonymous_function = true:warning
|
csharp_style_pattern_local_over_anonymous_function = true:warning
|
||||||
csharp_style_prefer_index_operator = true:warning
|
csharp_style_prefer_index_operator = false:warning
|
||||||
csharp_style_prefer_null_check_over_type_check = true
|
csharp_style_prefer_null_check_over_type_check = true
|
||||||
csharp_style_prefer_range_operator = true:warning
|
csharp_style_prefer_range_operator = false:warning
|
||||||
csharp_style_throw_expression = true
|
csharp_style_throw_expression = true
|
||||||
csharp_style_unused_value_assignment_preference = discard_variable:warning
|
csharp_style_unused_value_assignment_preference = discard_variable:warning
|
||||||
csharp_style_unused_value_expression_statement_preference = discard_variable:warning
|
csharp_style_unused_value_expression_statement_preference = discard_variable:warning
|
||||||
|
Loading…
x
Reference in New Issue
Block a user