1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-10 03:47:03 +02:00
Commit Graph

171 Commits

Author SHA1 Message Date
Eli Young
5252f74ade feat: Convert flag fields into lists
This allows users to specify different sets of compiler, assembler,
and/or linker flags for different packages. It also makes it possible to
specify generic flags that contain spaces. It does this while
maintaining compatibility with the old format of the fields in question
by up-converting bare strings into single-element lists.

Resolves #668
2018-05-15 08:12:11 -03:00
Carlos Alexandro Becker
0694b46bcc
fix: better deprecation notices (#561)
* fix: better deprecation notices

* test: covered deprecate with tests

* docs: improved docs

* docs: improved docs

* chore: organize imports

* style: code improve
2018-02-17 13:43:29 -02:00
Edward Wilde
eef2647570 feat: Adds template support to binary property (#544)
I added support for using the Go template engine with the binary
property. This is needed for generating binaries that include
the current version number in their file name. For example
`terraform-provider-NAME_vX.Y.Z`.
2018-02-15 09:30:15 -02:00
Carlos Alexandro Becker
e4048c2456 feat: expand env on build envs 2018-02-12 21:05:35 -02:00
Carlos Alexandro Becker
fe8f503420
test: improve tests as per review 2018-01-28 11:32:14 -02:00
Carlos Alexandro Becker
fc7f33be98
style: renamed Default to WithDefaults 2018-01-26 19:35:12 -02:00
Carlos Alexandro Becker
a2d8087661
style: avoid bad abstractions 2018-01-26 19:26:28 -02:00
Carlos Alexandro Becker
b297757640
test: cover pipeline/build 100% 2018-01-26 18:59:38 -02:00
Carlos Alexandro Becker
a2e2177a99
fix: linter errors 2018-01-24 21:22:45 -02:00
Carlos Alexandro Becker
befc04627f
test: fixed build pipeline tests 2018-01-23 00:22:16 -02:00
Carlos Alexandro Becker
9416dcc751
refactor: just started fixing tests 2018-01-22 01:10:17 -02:00
Carlos Alexandro Becker
4e6982a524
refactor: allow builders to have custom defaults 2018-01-21 23:37:39 -02:00
Carlos Alexandro Becker
42a8f0b194
refactor: adios build target 2018-01-21 22:44:06 -02:00
Carlos Alexandro Becker
d954f8a6df
wip 2018-01-21 18:54:33 -02:00
Carlos Alexandro Becker
a457ae6e17
feat: support multiple build systems 2018-01-21 14:31:08 -02:00
Carlos Alexandro Becker
9021160b11 fix: break if env not available
closes #467
2018-01-02 19:01:55 -02:00
Carlos Alexandro Becker
6b0e6686a5
test: fixed tests 2017-12-29 17:35:22 -02:00
Carlos Alexandro Becker
a84148c620
feat: make goreleaser timeoutable 2017-12-29 17:07:06 -02:00
Carlos Alexandro Becker
b667490ce4
fix: add the build artifact only if build succeeds 2017-12-18 21:07:33 -02:00
Carlos Alexandro Becker
f9dbfb5d70
fix: cleaning up 2017-12-17 22:28:24 -02:00
Carlos Alexandro Becker
753359a63a
test: removed useless test 2017-12-17 20:26:30 -02:00
Carlos Alexandro Becker
d8987e281f
test: fixing build pipe tets 2017-12-17 20:25:54 -02:00
Carlos Alexandro Becker
32fbebcc58
refactor: small fixes here and there 2017-12-17 18:01:58 -02:00
Carlos Alexandro Becker
b9cc820e1d
refactor: changed code on build pipe 2017-12-17 15:24:49 -02:00
Frank Schroeder
904d4455f4 test: add test for name_template with env var
Add a test for name_template with an env var.
2017-12-07 23:21:43 -02:00
Frank Schroeder
ca3eedfea8 feat: support env vars for name_template
This patch adds support to use env vars for the
archive.name_template parameter.
2017-12-07 23:21:43 -02:00
Frank Schroeder
1c2afe148f fix: move env vars to context
In preparation to support env vars for Docker tag_template and also to
simplify the tests by not chaning the global os.Environ I've moved the
parsed env var map into the context.Context.
2017-12-05 21:42:04 -02:00
Frank Schroeder
3e0b7fbd46 fix: split env vars into only two parts
The loadEnv() function was splitting env vars on all `=` characters
which is not correct. Env vars are `key=val` and contain only two parts.
2017-12-05 21:42:04 -02:00
Carlos Alexandro Becker
d5c7af1db9 feat: support environment variables on ldflags
Supports passing environment variables to ldflags by using .Env.VARNAME.

Closes #426
2017-12-04 09:23:26 -02:00
Carlos Alexandro Becker
b77acd2cc7 test: improving tests
Moved tests from defaults to build pipe, as it
doesnt make sense to be there.
2017-12-03 13:00:01 -02:00
Carlos Alexandro Becker
44d01ceccb fix: removed uneeded docs
We use fmt.Stringer now
2017-12-03 13:00:01 -02:00
Carlos Alexandro Becker
208ab4df23 fix: lint issue
I was shadowing binaryName
2017-12-03 13:00:01 -02:00
Carlos Alexandro Becker
0c91f6e210 test: build tests
Added more tests to cover defaulter. Also moved
some code around.
2017-12-03 13:00:01 -02:00
Carlos Alexandro Becker
8c86228e42 fix: fixed name template
I changed it, dunno why. Lets keep changes minumum
2017-12-03 13:00:01 -02:00
Carlos Alexandro Becker
0d9da86624 fix: missing Binary field
Readded it for now. Should remove it someday as it is deprecated
2017-12-03 13:00:01 -02:00
Carlos Alexandro Becker
eb19e2b5d9 refactor: rm internal/name pkg
Each pipe now does its own templating
2017-12-03 13:00:01 -02:00
Carlos Alexandro Becker
1ed299a6d7 refactor: defaulter interface
Right now the code looks weird because the defaults
of a pipe are far away of the implementation of the pipe.

the intend of this PR is to bring them closer by having a
Defaulter interface.

I also renamed the Pipe interface to Piper, and removed
the Description method in favor for fmt.Stringer.
2017-12-03 13:00:01 -02:00
Carlos Alexandro Becker
2cc10c3cc8 chore: fixed/ignore lint issues
GAS started to break on file/folder permissions
and executing things with variables.

closes #422
2017-11-26 20:40:07 -02:00
Carlos Alexandro Becker
dba83bff60 refactor: using os.Stat to decide wether it is a file or a dir
This should avoid some failures.
2017-11-21 08:27:32 -02:00
Carlos Alexandro Becker
03aec11c60 refactor: small improvement on if stmt
Inverted if statements are harder to read. No need for that.
2017-11-21 08:27:32 -02:00
Carlos Alexandro Becker
9a9b9373a2 fix: accepting non-main.go files as well
Previous code was handling only main.go as the main build file, but
the main function can actually be in any file.

Now, if a specific file (*.go) is passed, that file will be checked
for the main function.

If a folder is passed, the package will be scanned for the main
function.
2017-11-21 08:27:32 -02:00
Carlos Alexandro Becker
13d2bca06f refactor: improved error message
The error message was kind of bad. Improved it
2017-11-21 08:27:32 -02:00
Carlos Alexandro Becker
a9f33bd659 test: added a test case for an invalid main.go
The user could set the main to anything, so, added a test
for an invalid file as main.
2017-11-21 08:27:32 -02:00
Carlos Alexandro Becker
5a2f6d0318 refactor: remove unnecessary code
Since e0897fc2d2 this is not needed
anymore.
2017-11-21 08:27:32 -02:00
Carlos Alexandro Becker
8ae5d1563b refactor: using errors package properly
The errors.Wrap already returns nil if the wrapped error is nil,
	therefore the if statement is unecessary.
2017-11-21 08:27:32 -02:00
Carlos Alexandro Becker
48ddd4c0eb refactor: using ast parser instead
Using the ast parser, so we don't need to glob and goreleaser will work
reliably even if the files aren't gofmt'd.
2017-11-21 08:27:32 -02:00
Carlos Alexandro Becker
eb48a028bd refactor: improved test code
Improved test to better check errors.
2017-11-21 08:27:32 -02:00
Carlos Alexandro Becker
ce9e1c575c refactor: improved error messages
They were not very clear.
2017-11-21 08:27:32 -02:00
Carlos Alexandro Becker
83093ac477 feat: break if main package doesnt have a main func
Breaks the release if the package being built doesnt
have a main function.

Also improved error handling in the build pipe.

Closes #415
2017-11-21 08:27:32 -02:00
Carlos Alexandro Becker
d85a9001ec
removing all assert.New because vet shadow complains about this now
aaaaaaaaaaarhhhhhhhhgttt
2017-09-26 19:24:49 -03:00