-
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.
GitAuto: [FEATURE] Installation script for this template (PowerShell …
…and Bash) (#45) * Update install.ps1. * Update install.sh. * Update install.sh --------- Co-authored-by: gitauto-ai[bot] <161652217+gitauto-ai[bot]@users.noreply.github.com> Co-authored-by: gstraccini[bot] <150967461+gstraccini[bot]@users.noreply.github.com> Co-authored-by: Guilherme Branco Stracini <[email protected]>
- Loading branch information
1 parent
b658fdb
commit cd99a9c
Showing
2 changed files
with
75 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Param( | ||
[string]$ProjectName, | ||
[string]$Namespace, | ||
[string]$SonarCloudUrl, | ||
[string]$HealthChecksId | ||
) | ||
|
||
Write-Host "Setting up project: $ProjectName" | ||
|
||
# Update .wakatime and README.md | ||
(Get-Content .wakatime-project) -replace 'TemplateProject', $ProjectName | Set-Content .wakatime-project | ||
(Get-Content README.md) -replace 'TemplateProject', $ProjectName | Set-Content README.md | ||
|
||
# Update composer.json | ||
(Get-Content composer.json) -replace 'TemplateNamespace', $Namespace | Set-Content composer.json | ||
|
||
# Update Healthchecks.io badge | ||
Write-Host "Please create a HealthChecks.io account if needed." | ||
(Get-Content README.md) -replace 'HealthChecksId', $HealthChecksId | Set-Content README.md | ||
|
||
# Update SonarCloud URL | ||
(Get-Content README.md) -replace 'SonarCloudUrl', $SonarCloudUrl | Set-Content README.md | ||
|
||
# Run composer install | ||
Write-Host "Running composer install..." | ||
composer install | ||
|
||
Write-Host "Project setup complete." | ||
|
||
# Additional PHP setup tasks | ||
Write-Host "Performing additional PHP setup tasks..." | ||
# Add any additional setup commands here | ||
|
||
Write-Host "Setup finished successfully." |
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,41 @@ | ||
#!/bin/bash | ||
|
||
echo "Enter the project name:" | ||
read -r project_name | ||
|
||
echo "Enter the default namespace:" | ||
read -r namespace | ||
|
||
echo "Enter the SonarCloud URL:" | ||
read -r sonarcloud_url | ||
|
||
echo "Enter the HealthChecks.io ID:" | ||
read -r healthchecks_id | ||
|
||
echo "Setting up project: $project_name" | ||
|
||
# Update .wakatime and README.md | ||
sed -i "s/TemplateProject/$project_name/g" .wakatime-project | ||
sed -i "s/TemplateProject/$project_name/g" README.md | ||
|
||
# Update composer.json | ||
sed -i "s/TemplateNamespace/$namespace/g" composer.json | ||
|
||
# Update Healthchecks.io badge | ||
echo "Please create a HealthChecks.io account if needed." | ||
sed -i "s/HealthChecksId/$healthchecks_id/g" README.md | ||
|
||
# Update SonarCloud URL | ||
sed -i "s|SonarCloudUrl|$sonarcloud_url|g" README.md | ||
|
||
# Run composer install | ||
echo "Running composer install..." | ||
composer install | ||
|
||
echo "Project setup complete." | ||
|
||
# Additional PHP setup tasks | ||
echo "Performing additional PHP setup tasks..." | ||
# Add any additional setup commands here | ||
|
||
echo "Setup finished successfully." |