-
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.
Fix [FEATURE] Create installation scripts and use README template wit…
…h gitauto model (#11) * Update install.ps1 * Update install.sh * Update install.bat * Update README.template.md * Update README.md * Update README.md --------- Co-authored-by: gitauto-ai[bot] <161652217+gitauto-ai[bot]@users.noreply.github.com> Co-authored-by: Guilherme Branco Stracini <[email protected]>
- Loading branch information
1 parent
f8b0a8f
commit 14d4654
Showing
5 changed files
with
120 additions
and
0 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
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,29 @@ | ||
# Project Title | ||
|
||
One Paragraph of project description goes here. | ||
|
||
## Getting Started | ||
|
||
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. | ||
|
||
### Prerequisites | ||
|
||
What things you need to install the software and how to install them | ||
|
||
``` | ||
Give examples | ||
``` | ||
|
||
### Installing | ||
|
||
A step by step series of examples that tell you how to get a development env running | ||
|
||
Say what the step will be | ||
|
||
``` | ||
Give the example | ||
``` | ||
|
||
Repeat until finished | ||
|
||
End with an example of getting some data out of the system or using it for a little demo |
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 @@ | ||
powershell -ExecutionPolicy Bypass -File install.ps1 |
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,35 @@ | ||
$POCName = Read-Host -Prompt 'POC name (readable version)' | ||
$MainProjectFile = "Src/POCTemplate/POCTemplate.csproj" | ||
$UnitTestProjectFile = "Tests/POCTemplate.Tests/POCTemplate.Tests.csproj" | ||
$MainDir = "Src/POCTemplate" | ||
$UnitTestDir = "Tests/POCTemplate.Tests" | ||
|
||
rm README.md | ||
mv "README.template.md" "README.md" | ||
|
||
(Get-Content README.md) | ForEach-Object {$_ -replace "POCTemplate", $POCName} | Set-Content README.md | ||
(Get-Content .wakatime-project) | ForEach-Object {$_ -replace "POCTemplate", "$POCName"} | Set-Content .wakatime-project | ||
(Get-Content _config.yml) | ForEach-Object {$_ -replace "POCTemplate", $POCName} | Set-Content _config.yml | ||
|
||
(Get-ChildItem -Recurse -Include *.cs*) | ForEach-Object { | ||
$Content = Get-Content $_ | ||
$Content = $Content -replace "POCTemplate", $POCName | ||
Set-Content -Path $_.fullname -Value $Content | ||
} | ||
|
||
(Get-ChildItem -Recurse -Include *.csproj*) | ForEach-Object { | ||
$Content = Get-Content $_ | ||
$Content = $Content -replace "POCTemplate", $POCName | ||
Set-Content -Path $_.fullname -Value $Content | ||
} | ||
|
||
(Get-Content POCTemplate.sln) | ForEach-Object {$_ -replace "POCTemplate", $POCName} | Set-Content POCTemplate.sln | ||
Rename-Item -Path ".\POCTemplate.sln" ".\$POCName.sln" | ||
Rename-Item -Path $MainProjectFile -NewName "$POCName.csproj" | ||
Rename-Item -Path $UnitTestProjectFile -NewName "$POCName.Tests.csproj" | ||
Rename-Item -Path $MainDir $POCName | ||
Rename-Item -Path $UnitTestDir "$POCName.Tests" | ||
|
||
Remove-Item install.bat | ||
Remove-Item install.ps1 | ||
Remove-Item install.sh |
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,33 @@ | ||
#!/bin/bash | ||
read -p 'POC name (readable version): ' POCName | ||
|
||
MainProjectFile="Src/POCTemplate/POCTemplate.csproj" | ||
UnitTestProjectFile="Tests/POCTemplate.Tests/POCTemplate.Tests.csproj" | ||
MainDir="Src/POCTemplate" | ||
UnitTestDir="Tests/POCTemplate.Tests" | ||
|
||
rm README.md | ||
mv "README.template.md" "README.md" | ||
|
||
sed -i "s/POCTemplate/$POCName/g" README.md | ||
sed -i "s/POCTemplate/$POCName/g" .wakatime-project | ||
sed -i "s/POCTemplate/$POCName/g" _config.yml | ||
|
||
for file in $(find . -type f -name '*.cs*'); do | ||
sed -i "s/POCTemplate/$POCName/g" "$file" | ||
done | ||
|
||
for file in $(find . -type f -name '*.csproj*'); do | ||
sed -i "s/POCTemplate/$POCName/g" "$file" | ||
done | ||
|
||
sed -i "s/POCTemplate/$POCName/" "POCTemplate.sln" | ||
mv "POCTemplate.sln" "$POCName.sln" | ||
mv "$MainProjectFile" "$POCName.csproj" | ||
mv "$UnitTestProjectFile" "$POCName.Tests.csproj" | ||
mv "$MainDir" "$POCName" | ||
mv "$UnitTestDir" "$POCName.Tests" | ||
|
||
rm install.bat | ||
rm install.ps1 | ||
rm install.sh |