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
0074b79819
fix: fixing test to use the right import
...
VSCode used alecthomas/template instead of text/template
automatically, tests begin to fail when I fixed it
2017-12-05 14:49:25 -02:00
Carlos Alexandro Becker
3be7299047
fix: using the right import
...
VSCode used alecthomas/template instead of
text/template automatically
2017-12-05 14:49:25 -02:00
Carlos Alexandro Becker
8d9245d4d3
docs: documented tag_template field
...
New feature recently added
2017-12-05 14:49:25 -02:00
Carlos Alexandro Becker
8f5cf8a102
feat: release our docker image as vX.Y.Z
...
Using the tag instead of the version
2017-12-05 14:49:25 -02:00
Carlos Alexandro Becker
14d1347ed9
feat: allow templates on docker tags
...
Allow to template docker tags.
Closes #433
2017-12-05 14:49:25 -02:00
Carlos Alexandro Becker
6dc31b53bd
docs: fixes to use the "default" fork
...
I was using my own fork, but its getting
hard to maintain that. Lets use the
default version.
2017-12-04 09:49:29 -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
2dfdb4cd61
test: fpm tests
...
Added more tests to cover defaulter.
2017-12-03 13:00:01 -02:00
Carlos Alexandro Becker
a432839ad4
test: brew tests
...
Added more tests to cover defaulter.
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
b702adfc61
test: docker tests
...
Added tests for docker defaulter
2017-12-03 13:00:01 -02:00
Carlos Alexandro Becker
8535ed3811
test: archive tests
...
Added tests for archive defaulter
2017-12-03 13:00:01 -02:00
Carlos Alexandro Becker
278026992b
fix: checksums pipe
...
I messed up the name template, tests save me
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
a3a10fab37
test: release tests
...
Added tests for release defaulter
2017-12-03 13:00:01 -02:00
Carlos Alexandro Becker
f9cdb2df04
test: added test for snapshot
...
Added tests for snapshot defaulter
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
66e8f98735
fix: removed unused import
...
Dunno why vscode did not removed it
2017-12-03 13:00:01 -02:00
Carlos Alexandro Becker
2b42a7346f
fix: improved defaulter documentation
...
As suggested by @jorin
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
3fd9e0f306
fix: checksums pipe
...
An if statement was wrong, fixed it and added tests
2017-12-03 13:00:01 -02:00
Carlos Alexandro Becker
65a8e96779
fix: broken test
...
Was using a constant that no longer exists
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
4b98d14f70
docs: moving some sections
...
Improved docs by renaming and moving some sections
2017-11-26 22:20:40 -02:00
Carlos Alexandro Becker
27426f2a72
docs: changed environment variables
...
Changed the name to "environment" only, so it
also covers other environment stuff
2017-11-26 22:20:40 -02:00
Carlos Alexandro Becker
db53622b24
docs: added the dist option docs
...
Documenting the new option
2017-11-26 22:20:40 -02:00
Carlos Alexandro Becker
86270374d5
chore: added empty lines
...
Just to make the output cleaner.
2017-11-26 22:20:40 -02:00
Carlos Alexandro Becker
8e6133c70c
feat: allow override dist folder
...
Allow configuring the dist folder via
config file.
Closes #421
2017-11-26 22:20:40 -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
adc2d7d4c5
fix: dependencies and conflicts on brew tap
...
They were being inlined, generating an invalid receipt.
closes #416
2017-11-13 18:02:25 -02:00
Carlos Alexandro Becker
752c0711e1
chore: enable debug in fpm TestRunPipe
...
So we can know why it failed if it fails for whatever reason
2017-11-08 21:00:09 -02:00
Carlos Alexandro Becker
3064e11b31
feat: improved fpm output
...
Only enable fpm's debug mode when goreleaser is in debug as well.
2017-11-08 21:00:09 -02:00
Joseph Wright
d9f13a3b12
refactor: set default value of bindir
in defaults pipe
...
Rather than using a conditional to check if `bindir` has been set,
use the defaults pipe to set it to `/usr/local/bin` if it has not
been set in the config file.
2017-11-08 19:11:10 -02:00
Joseph Wright
5193680e76
feat: Allow overriding fpm destination for binaries
...
Some packagers may want to put binaries in a location other than
/usr/local/bin. This allows one to override the destination for
binaries when using fpm, using the `fpm.bindir` config key.
2017-11-08 19:11:10 -02:00