| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | |
| 3 | # Get Git information |
| 4 | VERSION=$(gitscip-shell system . . git. describe --tags --always --dirty 2>/dev/nullscip-shell filesystem . . `/dev/null`. || echoscip-shell system . . echo. "unknown") |
| 5 | COMMIT=$(gitscip-shell system . . git. rev-parse --short HEAD 2>/dev/nullscip-shell filesystem . . `/dev/null`. || echoscip-shell system . . echo. "unknown") |
| 6 | DATE=$(gitscip-shell system . . git. log -1 --format=%cd --date=iso | datescip-shell system . . date. -u +%Y-%m-%dT%H:%M:%SZ 2>/dev/nullscip-shell filesystem . . `/dev/null`. || echoscip-shell system . . echo. "unknown") |
| 7 | |
| 8 | # Build with ldflags |
| 9 | goscip-shell system . . go. build -ldflags "-s -w -X github.com/nicholas-fedor/shoutrrr/internal/meta.Version=$VERSION -X github.com/nicholas-fedor/shoutrrr/internal/meta.Commit=$COMMIT -X github.com/nicholas-fedor/shoutrrr/internal/meta.Date=$DATE" -o ./bin/shoutrrr ./shoutrrr |