pg-schema-diff
LOW
maintainer agony4001
0 votes
scanned 2026-10-27 15:48:05.092314
Why flagged
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
Triggered rules
Low
Few votes, recently uploaded
zero_votes_recent
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
PKGBUILD
1
# Maintainer: agony <27015 at riseup dot net>
2
3
pkgname=pg-schema-diff
4
pkgver=1.0.9
5
pkgrel=1
6
pkgdesc='Diff PostgreSQL schemas and generate SQL migrations'
7
arch=('x86_64' 'aarch64')
8
url='https://github.com/stripe/pg-schema-diff'
9
license=('MIT')
10
depends=('glibc')
11
makedepends=('git' 'go')
12
source=("${pkgname}::git+${url}.git#tag=v${pkgver}")
13
sha256sums=('f872febc4bbdc79be47904ea5e003b282345eeb3a75ef4245d61920f90092c4c')
14
15
prepare() {
16
cd "${pkgname}"
17
export GOPATH="${srcdir}/gopath"
18
go mod download -x -modcacherw
19
}
20
21
build() {
22
cd "${pkgname}"
23
export GOPATH="${srcdir}/gopath"
24
export CGO_CPPFLAGS="${CPPFLAGS}"
25
export CGO_CFLAGS="${CFLAGS}"
26
export CGO_CXXFLAGS="${CXXFLAGS}"
27
export CGO_LDFLAGS="${LDFLAGS}"
28
export GOFLAGS='-buildmode=pie -trimpath -mod=readonly -modcacherw'
29
# Go stamps the version from the git tag; an untracked file in the clone adds +dirty
30
go build -v -ldflags=-linkmode=external -o "${srcdir}/build/" ./cmd/pg-schema-diff
31
cd "${srcdir}/build"
32
for shell in bash fish zsh; do
33
./pg-schema-diff completion "${shell}" > "completion.${shell}"
34
done
35
}
36
37
check() {
38
cd "${pkgname}"
39
export GOPATH="${srcdir}/gopath"
40
export GOFLAGS='-buildvcs=false -mod=readonly -modcacherw'
41
# The tests of the other packages start a local PostgreSQL server
42
go test ./internal/{concurrent,graph,pgidentifier,set,util}
43
}
44
45
package() {
46
cd "${srcdir}/build"
47
install -Dm755 pg-schema-diff -t "${pkgdir}/usr/bin"
48
install -Dm644 completion.bash "${pkgdir}/usr/share/bash-completion/completions/pg-schema-diff"
49
install -Dm644 completion.fish "${pkgdir}/usr/share/fish/vendor_completions.d/pg-schema-diff.fish"
50
install -Dm644 completion.zsh "${pkgdir}/usr/share/zsh/site-functions/_pg-schema-diff"
51
install -Dm644 "${srcdir}/${pkgname}/LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
52
}
53
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-10-27 15:48:05 | Low | 1 |