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
8 changes: 4 additions & 4 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.24.x

- name: Check out code
uses: actions/checkout@v3
go-version-file: 'go.mod'

- name: Build
run: go build .
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/dockerhub-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ jobs:
context: .
platforms: linux/amd64,linux/arm64,linux/arm
push: true
build-args: |
VERSION=${{ steps.meta.outputs.TAG }}
tags: projectdiscovery/pdtm:latest,projectdiscovery/pdtm:${{ steps.meta.outputs.TAG }}
2 changes: 1 addition & 1 deletion .github/workflows/release-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: "Set up Go"
uses: actions/setup-go@v4
with:
go-version: 1.24.x
go-version-file: 'go.mod'
check-latest: true
cache: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.24.x
go-version-file: 'go.mod'

- name: release test
uses: goreleaser/goreleaser-action@v4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/setup-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.24.x

- name: Check out code
uses: actions/checkout@v3
go-version-file: 'go.mod'

- name: Dry Run - No Tool Installed
run: go run .
Expand Down
3 changes: 3 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ builds:
- goos: windows
goarch: 'arm64'

ldflags:
- -s -w -X github.com/projectdiscovery/pdtm/internal/runner.version={{ .Tag }}

binary: '{{ .ProjectName }}'
main: cmd/{{ .ProjectName }}/{{ .ProjectName }}.go

Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM golang:1.24.3-alpine AS builder
FROM golang:1.25-alpine AS builder
ARG VERSION
RUN apk add --no-cache git gcc musl-dev
WORKDIR /app
COPY . /app
RUN go mod download
RUN go build ./cmd/pdtm
RUN go build -ldflags "-s -w ${VERSION:+-X github.com/projectdiscovery/pdtm/internal/runner.version=$VERSION}" ./cmd/pdtm

FROM alpine:latest
RUN apk add --no-cache bind-tools ca-certificates
Expand Down
5 changes: 4 additions & 1 deletion internal/runner/banner.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import (
updateutils "github.com/projectdiscovery/utils/update"
)

const version = "v0.1.3"
// version is the release version, injected at build time via
// -X github.com/projectdiscovery/pdtm/internal/runner.version=<tag>.
// The literal below is only a fallback for plain `go build`.
var version = "v0.1.5"

var banner = `
____
Expand Down
Loading