-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump deps and update project build collateral
- Loading branch information
1 parent
4042b93
commit ad86887
Showing
10 changed files
with
135 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
eval "$(lorri direnv)" | ||
use flake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
packer-plugin-ami-copy* | ||
**/mock.go | ||
SHA256SUMS* | ||
.direnv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,47 @@ | ||
env: | ||
- CGO_ENABLED=0 | ||
report_sizes: false | ||
|
||
builds: | ||
# A separated build to run the packer-plugins-check only once for a linux_amd64 binary | ||
- | ||
id: plugin-check | ||
mod_timestamp: '{{ .CommitTimestamp }}' | ||
hooks: | ||
post: | ||
# This will check plugin compatibility against latest version of Packer | ||
- cmd: | | ||
go install github.com/hashicorp/packer/cmd/packer-plugins-check@latest && | ||
packer-plugins-check -load={{ .Name }} | ||
dir: "{{ dir .Path}}" | ||
flags: | ||
- -trimpath #removes all file system paths from the compiled executable | ||
ldflags: | ||
- '-s -w -X main.Version={{.Version}} -X main.VersionPrerelease= ' | ||
goos: | ||
- linux | ||
goarch: | ||
- amd64 | ||
binary: '{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}' | ||
- | ||
mod_timestamp: '{{ .CommitTimestamp }}' | ||
flags: | ||
- -trimpath #removes all file system paths from the compiled executable | ||
ldflags: | ||
- '-s -w -X main.version={{.Version}} -X main.VersionPrerelease= ' | ||
goos: | ||
- freebsd | ||
- goos: | ||
- darwin | ||
- windows | ||
- linux | ||
- darwin | ||
- freebsd | ||
- netbsd | ||
- openbsd | ||
- solaris | ||
goarch: | ||
- "386" | ||
- amd64 | ||
- '386' | ||
- arm | ||
- arm64 | ||
ignore: | ||
- goos: darwin | ||
goarch: '386' | ||
- goos: linux | ||
goarch: amd64 | ||
binary: '{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}' | ||
mod_timestamp: "{{ .CommitTimestamp }}" | ||
flags: | ||
- -trimpath | ||
ldflags: | ||
- -s | ||
- -w | ||
- -extldflags | ||
- -static | ||
no_unique_dist_dir: true | ||
binary: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}" | ||
|
||
archives: | ||
- format: zip | ||
name_template: '{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}' | ||
- format: binary | ||
name_template: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}" | ||
|
||
checksum: | ||
name_template: '{{ .ProjectName }}_v{{ .Version }}_SHA256SUMS' | ||
name_template: 'SHA256SUMS' | ||
algorithm: sha256 | ||
|
||
signs: | ||
- id: sha256 | ||
artifacts: checksum | ||
|
||
sboms: | ||
- artifacts: binary | ||
|
||
snapshot: | ||
name_template: "{{ incpatch .Version }}-rc" | ||
|
||
release: | ||
changelog: | ||
skip: true | ||
draft: true |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
description = "packer-plugin-ami-copy"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
}; | ||
|
||
outputs = { nixpkgs, flake-utils, ... }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
pkgs = import nixpkgs { | ||
inherit system; | ||
config.allowUnfree = true; # BSL2... Hashicorp... | ||
}; | ||
in | ||
with pkgs; | ||
{ | ||
devShells.default = mkShell { | ||
packages = [ | ||
bashInteractive | ||
gnumake | ||
go | ||
goreleaser | ||
packer | ||
]; | ||
}; | ||
} | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.