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

1387 Commits

Author SHA1 Message Date
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
Andy Grunwald
0b0c12aaad fix: Adjusted codebase according comments from @caarlos0
- Renamed function to upload()
- Fixed an inline comment
- Excluded a defer file.Close() from errcheck analysis
2017-12-02 23:39:39 +01:00
Andy Grunwald
39db1d5b55 docs: Added missing yaml configuration for username
In the Customization chapter we missed the username configuration
2017-12-02 23:34:29 +01:00
Andy Grunwald
78f83ec466 test: Add three new unit tests for Artifactory pipeline
Three new unit tests added:
- TestRunPipe_NoFile: Checks the error if the file for the
upload is not there
- TestRunPipe_UnparsableTarget: Checks that an error will
be thrown if the target is not parsable
- TestRunPipe_DirUpload: Checks that an error will be
thrown when we try to upload a directory
2017-12-02 22:03:01 +01:00
Andy Grunwald
2842b86365 fix: Don't continue Artifactory pipeline when there is an error
We are able to define multiple Artifactory instances.
In the former implementation, we continue once one instance upload
was failing. Now we stop and throw the error.
2017-12-02 21:40:14 +01:00
Andy Grunwald
37bc09f2bc fix: Use HTTP error if upload to Artifactory failes
In a former commit we respected the error of the Close()
call for a HTTP response. The fix was to introduce named
return values (e.g. err for error).
The problem: We defered the resp.Close() via
err = resp.Close()
This had the effect of always overwrite the real error
that happen when the HTTP call failes (due to checkResponse func).
2017-12-02 21:29:59 +01:00
Andy Grunwald
b282c84df3 docs: Add {{ .Version }} variable into Artifactory docs
The target of the Artifactory configuration supports variables.
Now the {{ .Version }} variable is also used in the docs
2017-12-02 21:14:04 +01:00
Andy Grunwald
024ca0a1af fix: panic while access a http response in Artifactory pipeline
When the upload target is not resolvable by tcp (e.g. unknown host)
no response object will be generated.
In an error case the response object is used (it was assumed that
this will be there at every point in time).

This commit fixes this behaviour
2017-12-02 21:10:32 +01:00
Andy Grunwald
d9f349dd0c docs: Add first draft of documentation for Artifactory
The first draft of the Artifactory pipeline documentation was added.
2017-12-02 21:03:06 +01:00
Andy Grunwald
c1d2c28b0a fix: gometalinter warnings for Artifactory pipeline
gometalinter had several warnings about not respected
err return values from Close() calls
2017-12-02 20:47:02 +01:00
Andy Grunwald
492a018b7f feat: Added basic support to push binaries into Artifactory
Artifactory is an universal Artifact Repository Manager by
JFrog. See https://www.jfrog.com/artifactory/

It is available in an OSS and Enterprise version.
Many companies using this internally to store, manage and
distribute binaries within their internal infrastructure.

It adds basic support to push all generated binaries into an
Artifactory. Basic means only the built artifacts. Without
checksums or archives.
As an authentication only Basic auth is supported by this Pipe.

See #344
2017-12-02 20:26:55 +01: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
Carlos Alexandro Becker
7c9e1ee5f6
chore: add nolint to the todo make task
So we can also find nolints across the code and fix them.
2017-10-25 15:16:12 -02:00
Carlos Alexandro Becker
11fee22a2e fix: a new workdir for each fpm instance
This may avoid running into
https://github.com/jordansissel/fpm/issues/1423
2017-10-23 09:51:30 -02:00
Carlos Alexandro Becker
3234cb98da feat: make fpm respect --parallelism
It was firing unlimited fpm processes until now.
2017-10-23 09:51:30 -02:00
Carlos Alexandro Becker
df0cf14912 feat: re-added parallelism on fpm pipe
It was removed on commit ff42024 due to a possible bug on fpm
2017-10-23 09:51:30 -02:00
Carlos Alexandro Becker
415613e806
bump: deps
Updated all deps
2017-10-22 11:54:41 -02:00
Carlos Alexandro Becker
76087d53cd feat: validate changelog config for invalid fields
If the user configures the changelog section with an invalid key, show
an error.
2017-10-20 16:22:01 -02:00
Carlos Alexandro Becker
3d6e6cbcf6
chore: sorting goreleaser changelog
Asc sort our changelog
2017-10-20 15:54:43 -02:00
Carlos Alexandro Becker
ff42024602 fix: fpm fails randomly
FPM would randomly fail to build deb and rpm packages. It apparently
happens because fpm (or some tool it uses) shares state between runs
(possibly by overriding files that are going inside the archive).

The error `file changed as we read it` was happening, which is a `tar`
error.

I don't know how to fix this, but, in order to make goreleaser more
stable, I'll disable the concurrency here for now.

closes #333
2017-10-19 21:45:34 -02:00
Carlos Alexandro Becker
6277ab9ae3 feat: added sorting support to the changelog pipe
We can now add:

```yaml
changelog:
	sort: asc
```

to group together our commits by prefix or just to sort them...

Closes #284
2017-10-19 20:58:23 -02:00
Carlos Alexandro Becker
7506f0ff37 chore: passing down --debug to fpm
This shall helps in the cases fpm is failing for an unknown reason.

refs #333
2017-10-19 11:06:29 -02:00
Carlos Alexandro Becker
87ec4781ee
chore: added a todo task to the Makefile
Added a `todo` task in the `Makefile`, copied
from apex/up.
2017-10-19 10:50:49 -02:00
Carlos Alexandro Becker
e9ca883b0b
chore: filter some commits from our changelog
Removed docs and merges from our changelogs.
2017-10-18 09:43:18 -02:00