1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-24 04:16:27 +02:00

149 Commits

Author SHA1 Message Date
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 e0897fc2d292a134a6929ad1994af9ca8066db46 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
Carlos Alexandro Becker
5151f176cb
allow configuring parallelism via flag 2017-07-15 16:49:52 -03:00
Carlos Alexandro Becker
cae5d07141
fixed tests 2017-07-13 20:43:12 -03:00
Carlos Alexandro Becker
57a177495b
multiple binaries on naked release: fpm working 2017-07-13 19:46:48 -03:00
Carlos Alexandro Becker
485f71b51a
moving targets to buildtarget package as well 2017-07-09 13:14:35 -03:00
Carlos Alexandro Becker
ca9221a99c
fixes 2017-07-06 23:50:45 -03:00
Carlos Alexandro Becker
86e46fe61d
gometalinter fixes 2017-07-06 20:13:02 -03:00
Carlos Alexandro Becker
2e0e05134d
refactoring buildtarget 2017-07-06 19:49:21 -03:00
Carlos Alexandro Becker
02cf45cb7e
more build pipe tests 2017-07-03 01:31:57 -03:00
Carlos Alexandro Becker
3a4128b60f
fixed build tests 2017-07-03 01:11:46 -03:00
Carlos Alexandro Becker
8915f8bbf6
fixes for multiple builds 2017-07-03 00:57:39 -03:00
Carlos Alexandro Becker
827adc83c3
Merge branch 'builds' into naked-release 2017-07-03 00:10:04 -03:00
Carlos Alexandro Becker
0410f5bc72
cleaning up 2017-07-01 21:31:55 -03:00
Carlos Alexandro Becker
a9d6f0ab8c
fixed build tests 2017-07-01 13:21:07 -03:00
Carlos Alexandro Becker
3c68b894c5
archive pipe fixed 2017-07-01 12:46:08 -03:00
Carlos Alexandro Becker
45a24a1101
improved build 2017-07-01 12:27:13 -03:00
Carlos Alexandro Becker
059942124a
moved naming logic to another pkg 2017-07-01 12:14:43 -03:00
Carlos Alexandro Becker
05744bb0c7
wip more changes 2017-06-27 22:45:59 -03:00
Carlos Alexandro Becker
4504cd4527
fixing more errors 2017-06-27 19:36:36 -03:00
Carlos Alexandro Becker
ed5ccf9bdb
wip multiple builds 2017-06-27 19:20:08 -03:00
Carlos Alexandro Becker
cf3197eb40
improved debug logging 2017-06-25 11:37:40 -03:00
Carlos Alexandro Becker
9196f2efc3
merge 2017-06-23 19:48:52 -03:00
Carlos Alexandro Becker
295c7356f1
logs update 2017-06-23 19:47:08 -03:00