diff --git a/install.ps1 b/install.ps1 new file mode 100644 index 0000000..ae48303 --- /dev/null +++ b/install.ps1 @@ -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." \ No newline at end of file diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..98ec5b7 --- /dev/null +++ b/install.sh @@ -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."