Commit Graph

19 Commits

Author SHA1 Message Date
Brad Fitzpatrick fc64ec92e5 .github/workflows: run tests on the right branch
I copy/paste-d from another repo earlier and didn't realize
this repo uses 'master' as its main branch.

Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2024-01-13 17:12:42 -08:00
Brad Fitzpatrick bc9fbcd89e chip away at some staticcheck warnings
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2024-01-13 15:57:55 -08:00
Brad Fitzpatrick 09cf7e948b go.mod: remove old replaces, update deps, use Go 1.21
This also makes Windows pass tests again (fixed in Go 1.20:
https://github.com/golang/go/issues/51007)

Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2023-12-30 16:06:52 -08:00
Brad Fitzpatrick afb071614f cmd/pk-mount, pkg/fs: drop macOS FUSE support, update bazil.org/fuse
Our bazil.org/fuse FUSE library no longer supports macOS
(https://github.com/bazil/fuse/issues/224) because osxfuse is no
longer open source (https://github.com/osxfuse/osxfuse/issues/590).

Also, Apple is making it harder and harder (eventually impossible?) to
install custom kernel modules:
https://github.com/macfuse/macfuse/wiki/Getting-Started

So just give up on macOS FUSE support for now. We can resurrect it
later via WebDAV and/or NFS server support.

Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2023-12-30 15:40:51 -08:00
Brad Fitzpatrick b5823a65b9 pkg/deploy/gce: remove GCE deploy support
We used to have a web-based Perkeep launcher at perkeep.org/launch
that created a GCE-based Perkeep instance for users, where they pay
Google for compute time. (One of those "one click deploy" template things)

Unfortunately, Google broke their APIs for doing the third party VM
creations and we disabled it some years ago. But the code remains. And
now, updating it again, we find that they've broken it again:

   Error: pkg/deploy/gce/deploy.go:358:4: servicemanagement.NewServicesService(s).Enable undefined (type *servicemanagement.ServicesService has no field or method Enable)

It's not worth fighting Google's API breakages. Just remove the GCE
launcher support as it's been unused for years.

We can always resurrect this code from git if really needed. But a
Digital Ocean or Fly launcher would probably be much easier.

Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2023-12-30 12:47:01 -08:00
Brad Fitzpatrick f704514cb0 all: bump required Go version from Go 1.16 to Go 1.19
(Taking over #1632)

Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2022-12-31 22:45:40 -08:00
Tamás Gulácsi 8df8a3657d
staticcheck: Use time.Since, time.Until
checks S1012,S1024

Use global staticcheck.conf
2022-03-13 16:30:36 -04:00
Tamás Gulácsi c986ee3c62
Use modernc.org/sqlite (#1581)
* Use modernc.org/sqlite

This way it can be enabled by default, as it is a cgo-free, Go-only package.
No need for build tags, conditional compilation (whether libsqlite3-dev is installed).

* make.go: Remove unused -sqlite flag

* Remove use of -sqlite flag
2021-12-27 12:18:08 -08:00
Alexandre Viau 0f53db21f7
staticcheck: install with go.mod (#1568) 2021-09-04 19:57:39 -04:00
Tamás Gulácsi 9af293cf84
Add staticcheck
Only U1000 (unused) yet
2021-08-10 07:37:58 +02:00
Tamás Gulácsi b0126ed7cf
buildsystem: update dependencies (#1394)
* Update goleveldb to v1.0.0

* Update goleveldb to 64b5b1c739545ed311fb9d9924d19d188fabdc83

- fix data race (758128399b1df3a87e92df6c26c1d2063da8fabe)
- optimizations from bytes.Buffer (42cf80bcefdf184caead3785a11b06fe6dfe9649)
- fsync after creating new manifest (eb135432c5aa4c841c91f3fdc871f07a94aa5a44)

* Update all dependencies.

Keep google.golang.org/api on v0.42.0 as that's the latest not borking
servicemanagement/v1 APIService.Enable.

* Pin bazil.org to latest version that supports macOS

Support has been removed in mid-2018 - see
https://github.com/bazil/fuse/issues/224
for details.

* pkg/blobserver/sftp: Make it pass on Windows

Translate paths with filepath.ToSlash

* Remove macos test cache

* go mod tidy

Remove zembed*.go as pkg/fileembed is history

* Remove caching in tests-linux

Co-authored-by: Tamás Gulácsi <tamas@gulacsi.eu>
2021-07-31 18:54:25 -04:00
Alexandre Viau dd996d05f5
doc: document all environement variables (#1383)
envvardoc: repair the script so that it does not fail on very long
lines.

envvardoc: look for env vars with the `PERKEEP` prefix too.

envvardoc: adapt the `docVar` regex to the markdown format.

envvardoc: also look for vars in internal/.

CI: run envvardoc so that we notice when we add new undocumented
environement variables.

doc: List all remaining undocumented env variables. This "shitlist"
gives us a green build in the CI and allows us to ensure all new
environment variables are documented in the future.

doc: Link to the environment variables page.
2021-07-29 14:22:27 -04:00
Alexandre Viau 8171ea5b51
go 1.15 -> 1.16 (#1397) 2021-07-28 23:31:22 -04:00
Alexandre Viau fb961cf310
make codebase go-vet-clean (#1379)
Co-authored-by: Bob Glickstein <bobg@emphatic.com>
2021-07-26 21:19:53 -04:00
aviau 602825f334 CI: test on macOS
- Bump go-sqlite3 so that it includes the following fix:
  * https://github.com/mattn/go-sqlite3/pull/734
2021-01-16 23:12:33 -05:00
aviau 127297ff99 go fmt ./... + add CI test
Some code was merged without being fmt-compliant. This
PR runs `go fmt ./...` and adds a test to github workflows
to verify that pull requests are fmt-compliant.
2021-01-16 23:12:12 -05:00
aviau 5d8a9e87f7
gopherjs -> goplusjs
github.com/gopherjs/gopherjs no longer supports new Go versions and
doing a full perkeep build currently requires go 1.12.

This moves to github.com/goplusjs/gopherjs which supports new Go
version. Building perkeep no longer requires go 1.12.

- Support building webui with just go 1.15
- Before this PR, reactGen was built from the vendor directory.
  Now, it is built with gomodules. We can't run it with `go run`
  because it breaks myitcv.io/gogenerate which they use to determine
  what file to compile.
- go.mod: require go 1.15
- goplusjs/gopherjs is built and ran with gomodules. We run it
  with go run github.com/goplusjs/gopherjs
- Add test-tidy workflow to ensure that go.mod can't drift.
- We use go run -mod=readonly so packages are not sneakily updated.
  Any update in go.mod should be voluntary.
2021-01-13 21:55:21 -05:00
mpl cb96bb8bd3
all: update to Go 1.15 2020-11-02 14:44:01 +01:00
Will Norris f2e7add71b
Ci: move continuous integration tests to GitHub Actions
And remove the Travis CI ones.
2020-09-18 00:44:58 +02:00