Skip to content

Commit

Permalink
added a postStartCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
solomiofactura committed Sep 26, 2024
1 parent 87eb440 commit d2a57de
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
"ghcr.io/devcontainers/features/powershell:1": {}
},
"postCreateCommand": "cd /workspaces/PersistedAssemblyBuilder.ConsoleApp/.devcontainer/ && sudo chmod +x initializebashfiles.sh && ./initializebashfiles.sh",
"postStartCommand": ""
"postStartCommand": "/bin/bash"
}
5 changes: 3 additions & 2 deletions .devcontainer/load-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ if [ -f "$ENV_FILE_PATH" ]; then
key=$(echo "$key" | xargs)
value=$(echo "$value" | xargs)
export "$key=$value"
echo "export $key=\"$value\"" >> ~/.bashrc
echo "Set $key = $value" # Debug output
done < "$ENV_FILE_PATH"
# Apply the changes to the current session
source ~/.bashrc
else
echo "Environment file not found: $ENV_FILE_PATH"
ls -l "$ENV_FILE_PATH" # Show file details
fi


Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<#
To test run:
Import-Module C:\repo\Blazor.Tools\Blazor.Tools.BlazorBundler\tools\Set-EnvVars.psm1
Set-EnvVars -MajorVersion 3 -MinorVersion 1 -PatchVersion 8 -RevisionVersion 0 -NugetApiKey "YOUR_API_Key" -Publish $false -IsRelease $false -GitComment "Updated project with the latest changes"
Set-EnvVars -MajorVersion 3 -MinorVersion 1 -PatchVersion 8 -RevisionVersion 0 -Publish $false -IsRelease $false -GitComment "Updated project with the latest changes"
To remove:
Remove-Module -Name Set-EnvVars
Expand All @@ -21,8 +21,6 @@ param(
[Parameter(Mandatory=$true)]
[string] $RevisionVersion,
[Parameter(Mandatory=$true)]
[string] $NugetApiKey,
[Parameter(Mandatory=$true)]
[bool] $Publish,
[bool] $IsRelease = $false,
[string] $GitComment = "Updated project with the latest changes"
Expand Down Expand Up @@ -53,7 +51,7 @@ param(
Set-Item -Path "Env:MinorVersion" -Value $MinorVersion
Set-Item -Path "Env:PatchVersion" -Value $PatchVersion
Set-Item -Path "Env:RevisionVersion" -Value $RevisionVersion
Set-Item -Path "Env:NugetApiKey" -Value $NugetApiKey
Set-Item -Path "Env:NugetApiKey" -Value $Env:NugetApiKey
Set-Item -Path "Env:Publish" -Value $Publish
Set-Item -Path "Env:IsRelease" -Value $IsRelease
Set-Item -Path "Env:GitComment" -Value $GitComment
Expand Down

0 comments on commit d2a57de

Please sign in to comment.