Skip to content

Commit

Permalink
Merge branch 'main' into chore/oss-issues
Browse files Browse the repository at this point in the history
  • Loading branch information
prashant-shahi committed Jan 25, 2025
2 parents 29e5912 + c30c882 commit d9949a0
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: goreleaser

on:
push:
tags:
- v*
- histogram-quantile/v*

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
strategy:
matrix:
workdirs:
- scripts/clickhouse/histogramquantile
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: set-up-go
uses: actions/setup-go@v5
- name: run-goreleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser-pro
version: '~> v2'
args: release --clean
workdir: ${{ matrix.workdirs }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,5 @@ vendor/

# git-town
.git-branches.toml
# goreleaser
dist/
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ QUERY_SERVICE_DIRECTORY ?= pkg/query-service
EE_QUERY_SERVICE_DIRECTORY ?= ee/query-service
STANDALONE_DIRECTORY ?= deploy/docker/clickhouse-setup
SWARM_DIRECTORY ?= deploy/docker-swarm/clickhouse-setup
CH_HISTOGRAM_QUANTILE_DIRECTORY ?= scripts/clickhouse/histogramquantile

GOOS ?= $(shell go env GOOS)
GOARCH ?= $(shell go env GOARCH)
Expand Down Expand Up @@ -194,3 +195,15 @@ test:

test-ee:
go test ./ee/...

goreleaser-snapshot:
@if [[ ${GORELEASER_WORKDIR} ]]; then \
cd ${GORELEASER_WORKDIR} && \
goreleaser release --clean --snapshot; \
cd -; \
else \
goreleaser release --clean --snapshot; \
fi

goreleaser-snapshot-histogram-quantile:
make GORELEASER_WORKDIR=$(CH_HISTOGRAM_QUANTILE_DIRECTORY) goreleaser-snapshot
2 changes: 2 additions & 0 deletions deploy/docker/clickhouse-setup/user_scripts/.deprecated
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This directory is deprecated and will be removed in the future.
Please use the new directory for Clickhouse setup scripts: `scripts/clickhouse` instead.
45 changes: 45 additions & 0 deletions scripts/clickhouse/histogramquantile/.goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
version: 2

project_name: histogram-quantile

monorepo:
tag_prefix: histogram-quantile/

before:
hooks:
- go mod tidy
- cp ../../../LICENSE .
- cp ../../../README.md .

after:
hooks:
- rm LICENSE
- rm README.md

builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64

archives:
- formats:
- tar.gz
name_template: >-
{{ .ProjectName }}_{{- .Os }}_{{- .Arch }}
files:
- README.md
- LICENSE

release:
footer: >-
---
Released by [GoReleaser](https://github.com/goreleaser/goreleaser).

0 comments on commit d9949a0

Please sign in to comment.