Skip to content

Commit

Permalink
all: Update all dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennwc committed Jul 6, 2024
1 parent 1310f3b commit 0bcb9ba
Show file tree
Hide file tree
Showing 68 changed files with 1,424 additions and 2,309 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
vendor
.idea/
vendor/
23 changes: 9 additions & 14 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.19'
go-version: '1.21'

- name: Dependencies
run: go mod download
Expand All @@ -46,26 +46,21 @@ jobs:
needs:
- tests
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.19'
go-version: '1.21'

- name: Dependencies
run: go mod download

- name: Download UI
run: go run cmd/download_ui/download_ui.go

- name: Run Packr
run: |
go run github.com/gobuffalo/packr/v2/packr2
git checkout -- ./packrd/dummy.go
- name: Release
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v6
if: startsWith(github.ref, 'refs/tags/v')
with:
version: latest
Expand All @@ -81,14 +76,14 @@ jobs:
- tests

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Docker build
run: |
docker build -t $DOCKER_IMAGE_NAME:dev --build-arg VERSION=${{ github.ref_name }} .
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@v3
if: startsWith(github.ref, 'refs/tags/') || (github.ref == 'refs/heads/master')
with:
registry: ghcr.io
Expand Down
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
.idea/
db/
dist/
vendor/

*.swp
main
*.test
Expand All @@ -8,10 +13,6 @@ cayley.json
.cayley_history
.DS_Store

db/
dist/
vendor/
ui/
packrd/packed-*
# The build binary
/cayley
1 change: 0 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ builds:
- windows
goarch:
- amd64
- "386"
- arm64
- arm
ignore:
Expand Down
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Alexander Peters <[email protected]>
Andrew Dunham <[email protected]>
Bram Leenders <[email protected]>
Brendan Ball <[email protected]>
Denys Smirnov <[email protected]>
Denys Smirnov <[email protected]>
Derek Liang <[email protected]>
Iddan Aaronsohn <[email protected]>
Google Inc.
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Barak Michener <[email protected]> <[email protected]> <[email protected]>
Bram Leenders <[email protected]>
Brendan Ball <[email protected]>
Connor Newton <[email protected]>
Denys Smirnov <[email protected]>
Denys Smirnov <[email protected]>
Derek Liang <[email protected]>
Gaurav Tiwari <[email protected]>
Iddan Aaronsohn <[email protected]>
Expand Down
12 changes: 1 addition & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
FROM golang:1.19 as builder
FROM golang:1.21 as builder

ARG VERSION=v0.8.x-dev

# Install packr
RUN go install github.com/gobuffalo/packr/v2/packr2@latest

# Create filesystem for minimal image
WORKDIR /fs

Expand All @@ -21,16 +18,9 @@ WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download

# Copy UI download script and execute
COPY cmd/download_ui/ ./cmd/download_ui/
RUN go run cmd/download_ui/download_ui.go

# Add all the other files
ADD . .

# Run packr to generate .go files that pack the static files into bytes that can be bundled into the Go binary.
RUN packr2

# Pass a Git short SHA as build information to be used for displaying version
RUN GIT_SHA=$(git rev-parse --short=12 HEAD); \
go build \
Expand Down
2 changes: 1 addition & 1 deletion cmd/download_ui/download_ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const (
version = "v0.8.0"
fileURL = "https://github.com/cayleygraph/web/releases/download/" + version + "/web.zip"
fileName = "web.zip"
directoryName = "ui"
directoryName = "ui/web"
)

func main() {
Expand Down
36 changes: 3 additions & 33 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ Join our community on [discourse.cayley.io](https://discourse.cayley.io) or othe

## Simply building Cayley

If your version of Go &lt; 1.13, you need to run:

```text
export GO111MODULE=on
```

Follow the instructions for running Cayley locally:

```text
Expand All @@ -22,19 +16,11 @@ cd cayley
# Download dependencies
go mod download
# Download web files (optional)
# Update web files (optional)
go run cmd/download_ui/download_ui.go
# Install packr 2
go get -u github.com/gobuffalo/packr/v2/packr2
```

# Generate static files go modules

packr2

# build the binary

go build ./cmd/cayley
Expand All @@ -61,21 +47,11 @@ You can now open the WebUI in your browser: [http://127.0.0.1:64210](http://127.

## Hacking on Cayley

First, you'll need Go [\(version 1.11.x or greater\)](https://golang.org/doc/install) and a Go workspace. This is outlined by the Go team at [http://golang.org/doc/code.html](http://golang.org/doc/code.html) and is sort of the official way of going about it.

If your version of Go &lt; 1.13, you need to run:

```text
export GO111MODULE=on
```

If you just want to build Cayley and check out the source, or use it as a library, a simple `go get github.com/cayleygraph/cayley` will work!

But suppose you want to contribute back on your own fork \(and pull requests are welcome!\). A good way to do this is to set up your \$GOPATH and then...

```text
mkdir -p $GOPATH/src/github.com/cayleygraph
cd $GOPATH/src/github.com/cayleygraph
git clone https://github.com/$GITHUBUSERNAME/cayley
```

Expand All @@ -97,7 +73,7 @@ With that in place, that folder will reflect your local fork, be able to take ch
For iterating, it can be helpful to, from the directory, run

```text
packr2 && go build ./cmd/cayley && ./cayley <subcommand> <your options>
go build ./cmd/cayley && ./cayley <subcommand> <your options>
```

Which will also resolve the relevant static content paths for serving HTTP.
Expand All @@ -106,16 +82,10 @@ Which will also resolve the relevant static content paths for serving HTTP.

## Running Unit Tests

If your version of Go &lt; 1.13, you need to run:

```text
export GO111MODULE=on
```

First, `cd` into the `cayley` project folder and run:

```text
packr && go test ./...
go test ./...
```

If you have a Docker installed, you can also run tests for remote backend implementations:
Expand Down
8 changes: 2 additions & 6 deletions docs/getting-involved/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,9 @@ cd cayley
# Download dependencies
go mod download
# Download web files (optional)
# Update web files (optional)
go run cmd/download_ui/download_ui.go
# Install packr 2
go get -u github.com/gobuffalo/packr/v2/packr2
```

## Generate static files go modules
Expand Down Expand Up @@ -117,7 +113,7 @@ export GO111MODULE=on
First, `cd` into the `cayley` project folder and run:

```text
packr && go test ./...
go test ./...
```

If you have a Docker installed, you can also run tests for remote backend implementations:
Expand Down
Loading

0 comments on commit 0bcb9ba

Please sign in to comment.