Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/test-bug-416.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Repro Bug 416

on: [push]

jobs:
test-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.23"
- name: Install go-blueprint
run: go install .
- name: Setup git
run: |
git config --global user.email "[email protected]"
git config --global user.name "test"
- name: Test blueprint
run: |
go-blueprint create --name test --framework fiber --driver none --git commit
cd test
echo "All git tracked files:"
git ls-files
echo "git ignore contents:"
cat .gitignore
echo "All files in repo:"
Get-ChildItem -Force
shell: pwsh
- name: Check if .env file is committed (should fail if bug exists)
run: |
cd test
$envFileCommitted = git ls-files | Select-String -Pattern "\.env$"
if ($envFileCommitted) {
echo "ERROR: .env file was committed! Bug 416 is present."
echo "Files in commit:"
git ls-files
exit 1
} else {
echo "SUCCESS: .env file was not committed."
echo "Files in commit:"
git ls-files
}
shell: pwsh
5 changes: 5 additions & 0 deletions cmd/program/program.go
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,11 @@ func (p *Project) CreateMainFile() error {
return err
}

// Ensure file is flushed to storage
if err := gitignoreFile.Sync(); err != nil {
return err
}

// Create .air.toml file
airTomlFile, err := os.Create(filepath.Join(projectPath, ".air.toml"))
if err != nil {
Expand Down