Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip make log queryable and uploadable #78

Merged
merged 2 commits into from
Oct 11, 2024
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 6 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.19
uses: actions/setup-go@v1
- name: Set up Go 1.23
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.23
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v1
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Test
run: go test -mod=vendor -short ./...
37 changes: 37 additions & 0 deletions .github/workflows/release-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Create a dev release

on:
push:
branches:
- main

permissions:
contents: write

jobs:
create_a_dev_release:
name: create a dev release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: actions/setup-go@v3
with:
go-version: ">=1.23"
cache: true
- uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --clean --config ./goreleaser-dev.yaml
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
- run: echo "${HOME}/.humanlog/bin" >> $GITHUB_PATH
- run: curl https://humanlog.dev/install_apictl.sh | bash
- run: ./script/create_version_artifacts.sh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HMAC_KEY_ID: ${{ secrets.HMAC_KEY_ID }}
HMAC_PRIVATE_KEY: ${{ secrets.HMAC_PRIVATE_KEY }}
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ jobs:
- run: git fetch --force --tags
- uses: actions/setup-go@v3
with:
go-version: ">=1.19.4"
go-version: ">=1.23"
cache: true
- uses: goreleaser/goreleaser-action@v4
- uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --rm-dist
args: release --clean --config ./goreleaser.yaml
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
- run: echo "${HOME}/.humanlog/bin" >> $GITHUB_PATH
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
*.ignore
dist
debug.log
logdump.json
44 changes: 44 additions & 0 deletions .goreleaser-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
project_name: humanlog-dev
version: 2
before:
hooks:
- go mod tidy
- go generate ./...
builds:
- main: ./cmd/humanlog/
binary: humanlog
env:
- CGO_ENABLED=0
ldflags:
- -s -w -X main.versionMajor={{.Major}} -X main.versionMinor={{.Minor}} -X main.versionPatch={{.Patch}} -X main.versionPrerelease={{.Prerelease}} -X main.versionBuild={{.ShortCommit}} -X main.defaultApiAddr="https://api.humanlog.dev"
goos:
# - windows
- darwin
- linux
goarch:
- amd64
- arm64
release:
github:
owner: humanlogio
name: humanlog
target_commitish: "{{ .Commit }}"
prerelease: true
archives:
- name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
format_overrides:
- goos: windows
format: zip
checksum:
name_template: "checksums.txt"
snapshot:
version_template: "{{ incpatch .Version }}-next.{{ .Timestamp }}.{{ .ShortCommit }}"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
# modelines, feel free to remove those if you don't want/use them:
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
9 changes: 5 additions & 4 deletions goreleaser.yaml → .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
project_name: humanlog
version: 2
before:
hooks:
- go mod tidy
Expand All @@ -11,7 +12,7 @@ builds:
ldflags:
- -s -w -X main.versionMajor={{.Major}} -X main.versionMinor={{.Minor}} -X main.versionPatch={{.Patch}} -X main.versionPrerelease={{.Prerelease}} -X main.versionBuild={{.ShortCommit}}
goos:
- windows
# - windows
- darwin
- linux
goarch:
Expand All @@ -27,11 +28,11 @@ archives:
- goos: windows
format: zip
brews:
- tap:
- repository:
owner: humanlogio
name: homebrew-tap
nfpms:
- maintainer: "antoinegrondin@gmail.com"
- maintainer: "hi@webscale.com"
formats:
- deb
checksum:
Expand All @@ -48,7 +49,7 @@ checksum:
# ]
# artifacts: all
snapshot:
name_template: "{{ incpatch .Version }}-next"
version_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
Expand Down
17 changes: 17 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "humanlog --logsvc",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/humanlog/",
"cwd": "${workspaceFolder}",
"args": ["--logsvc", "http://127.0.0.1:8080"],
},
]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ brew install humanlog
## On linux (and macOS)

```bash
curl -L "https://humanlog.io/install.sh" | sh
curl -sSL "https://humanlog.io/install.sh" | sh
```

## Otherwise
Expand Down
Loading
Loading