Compare commits

...

4 Commits

Author SHA1 Message Date
463bed1353 wip: 2025-11-05 15:44:09 -05:00
9ab72a25fa fix(sync): Fixed an issue where deleted folders would be restored. 2025-11-05 15:43:32 -05:00
35519550ed build: Added release-please. 2025-11-05 15:34:06 -05:00
Spencer Brower
7a60c673be build: Updated go version for github action. 2025-11-05 15:34:03 -05:00
4 changed files with 29 additions and 3 deletions

View File

@@ -19,7 +19,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.24.6'
- name: Build
run: go build -v ./...

25
.github/workflows/release-please.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
on:
push:
branches:
- main
permissions:
contents: write
issues: write
pull-requests: write
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
with:
# this assumes that you have created a personal access token
# (PAT) and configured it as a GitHub action secret named
# `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important).
token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }}
# this is a built-in strategy in release-please, see "Action Inputs"
# for more options
release-type: go

View File

@@ -30,6 +30,7 @@ type scanConfig struct {
}
// Create a fresh config with sensible defaults.
// TODO: fd '\.env' -HI ~/ -E '*\.envrc' -E '\.env\.example' -E '\.local/' -E 'vendor' -E 'node_modules'
func NewConfig(privateKeyPaths []string) Config {
var keys = []SshKeyPair{}

View File

@@ -99,8 +99,8 @@ func getGitRemotes(dir string) []string {
func (file EnvFile) Restore() error {
// TODO: Handle restores more cleanly
// Ensure the directory exists
if err := os.MkdirAll(filepath.Dir(file.Path), 0755); err != nil {
return fmt.Errorf("failed to create directory: %w", err)
if _, err := os.Stat(file.Dir); err != nil {
return fmt.Errorf("directory missing")
}
// Check if file already exists