这是indexloc提供的服务,不要输入任何密码
Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .acceptance.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ builds:
env:
- CC=x86_64-linux-gnu-gcc
- CXX=x86_64-linux-gnu-g++
- CGO_ENABLED=1
- GOFLAGS=
- CGO_LDFLAGS=

ldflags:
- -s -w -X main.version={{.Version}} -X main.date={{.Date}} -X main.commit={{.Commit}} -X main.builtBy=goreleaser

tags: []

archives:
- id: homebrew
format: tar.gz
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/01-tailpipe-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
build_and_release:
name: Build and Release Tailpipe
needs: [ensure_branch_in_homebrew]
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
steps:
- name: validate
if: github.ref == 'refs/heads/develop'
Expand Down Expand Up @@ -110,6 +110,20 @@ jobs:
token: ${{ secrets.GH_ACCESS_TOKEN }}
ref: main

- name: Set up Docker
uses: docker/setup-buildx-action@v3

- name: Install Docker (if needed)
run: |
if ! command -v docker &> /dev/null; then
sudo apt-get update
sudo apt-get install -y docker.io
fi

- name: Verify Docker installation
run: |
docker --version

- name: Calculate version
id: calculate_version
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/11-test-acceptance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:
jobs:
goreleaser:
name: Build
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
28 changes: 19 additions & 9 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,50 @@
version: 2

builds:
- id: tailpipe-linux-arm64
- id: tailpipe-linux-amd64
binary: tailpipe
goos:
- linux
goarch:
- arm64
- amd64

env:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
- CC=x86_64-linux-gnu-gcc
- CXX=x86_64-linux-gnu-g++
- CGO_ENABLED=1
- GOFLAGS=
- CGO_LDFLAGS=

# Custom ldflags.
#
# Default: '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser'
# Templates: allowed
ldflags:
# Go Releaser analyzes your Git repository and identifies the most recent Git tag (typically the highest version number) as the version for your release.
# Goreleaser analyzes your Git repository and identifies the most recent Git tag (typically the highest version number) as the version for your release.
# This is how it determines the value of {{.Version}}.
- -s -w -X main.version={{.Version}} -X main.date={{.Date}} -X main.commit={{.Commit}} -X main.builtBy=goreleaser

- id: tailpipe-linux-amd64
tags: []

- id: tailpipe-linux-arm64
binary: tailpipe
goos:
- linux
goarch:
- amd64
- arm64

env:
- CC=x86_64-linux-gnu-gcc
- CXX=x86_64-linux-gnu-g++
- CC=gcc
- CXX=g++
- CGO_ENABLED=1
- GOFLAGS=
- CGO_LDFLAGS=

ldflags:
- -s -w -X main.version={{.Version}} -X main.date={{.Date}} -X main.commit={{.Commit}} -X main.builtBy=goreleaser

tags: []

- id: tailpipe-darwin-arm64
binary: tailpipe
goos:
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
OUTPUT_DIR?=/usr/local/bin
PACKAGE_NAME := github.com/turbot/tailpipe
GOLANG_CROSS_VERSION ?= gcc13-osxcross-20250912194615
GOLANG_CROSS_VERSION ?= gcc13-osxcross-20251006102018

# sed 's/[\/_]/-/g': Replaces both slashes (/) and underscores (_) with hyphens (-).
# sed 's/[^a-zA-Z0-9.-]//g': Removes any character that isn’t alphanumeric, a dot (.), or a hyphen (-).
Expand Down Expand Up @@ -30,6 +30,7 @@ release-dry-run:
release-acceptance:
@docker run \
--rm \
--platform=linux/arm64 \
-e CGO_ENABLED=1 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v `pwd`:/go/src/tailpipe \
Expand All @@ -48,6 +49,7 @@ release:
fi
docker run \
--rm \
--platform=linux/arm64 \
-e CGO_ENABLED=1 \
--env-file .release-env \
-v /var/run/docker.sock:/var/run/docker.sock \
Expand Down