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

48 Commits

Author SHA1 Message Date
Carlos Alexandro Becker
d295d0bdff
feat: annotated tag body (#2923)
* feat: annotated tag body

this adds another template variable, `TagBody`, with the body of the annotated tag/commit message only.

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* refactor: tag contents

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-02-24 22:57:51 -03:00
Carlos A Becker
f01c60026c
fix: improve git tag contents output
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-12-06 17:21:37 -03:00
Carlos Alexandro Becker
6ea7fb792a
feat: annotated tag contents (#2744)
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-12-06 16:52:26 -03:00
Carlos Alexandro Becker
9b9eef04a2
feat: get annotated tag message (#2730)
refs  #2726

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-12-05 23:23:15 -03:00
Carlos Alexandro Becker
e8fca30104
refactor: remove unused git.RunEnv (#2706)
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-11-28 00:22:44 -03:00
Erik Kristensen
274ffae03c
feat: add git summary support (aka git describe --dirty --tags --always) (#2700)
* feat: add git summary support (aka git describe --dirty --tags --always)

* feat: update documentation for new summary template variable

* test: add tests for new summary feature
2021-11-25 03:01:56 +00:00
Carlos Alexandro Becker
cd261a527a
feat: allow to use .PreviousTag on templates (#2683)
* feat: expose .PreviousTag

* fix: previous tag will never be a commit

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* fix: tests

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* docs: tag

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-11-24 09:12:24 -03:00
Carlos A Becker
9505cf7054
feat: improve git dirty error
also added a /errors page to our docs

closes #2674
2021-11-21 12:47:25 -03:00
Carlos Alexandro Becker
a2ba9cb8fa
refactor: release url (#2637)
* refactor: release url

* chore: fmt

* chore: less diffs

* docs: lowercase everything

* chore: improve fmt

* chore: revert
2021-11-06 16:54:01 -03:00
Batuhan Apaydın
b99ccc029c
feat: add message template support for git providers (#2626)
* feat: add message template support for git providers

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
Co-authored-by: Furkan Türkal <furkan.turkal@trendyol.com>
Co-authored-by: Erkan Zileli <erkan.zileli@trendyol.com>
Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>

* Apply suggestions from code review

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Furkan Türkal <furkan.turkal@trendyol.com>
Co-authored-by: Erkan Zileli <erkan.zileli@trendyol.com>
2021-11-06 15:39:43 -03:00
Batuhan Apaydın
5a01a10f9b
fix: clean user information from remote url if it contains username and token (#2457) 2021-09-03 20:06:53 -03:00
Edward Maxwell-Lyte
18695c2687
fix: sort tags by version not day of the week (#2377)
* fix: tag sorting

When the HEAD commit has multiple tags, they are sorted in order to select the latest so that it can be released.

However, the existing sort would not work if there were multiple commits across a Wednesday and a Thursday.

For example:

```
git tag --points-at HEAD --format='%(creatordate)%09%(refname)'
Wed Jul 28 07:13:19 2021 +0000  refs/tags/v0.0.183
Thu Jul 29 13:31:07 2021 +0000  refs/tags/v0.0.184
Thu Jul 29 13:38:42 2021 +0000  refs/tags/v0.0.185
Thu Jul 29 13:57:44 2021 +0000  refs/tags/v0.0.186
```

When using the existing sort the `creatordate` field was targeted and reversed. Alphabetically Thursday comes before Wednesday, so that is reversed and the Wednesday release always comes first:
```
git tag --points-at HEAD --sort=-version:creatordate --format='%(creatordate)%09%(refname)'
Wed Jul 28 07:13:19 2021 +0000  refs/tags/v0.0.183
Thu Jul 29 13:57:44 2021 +0000  refs/tags/v0.0.186
Thu Jul 29 13:38:42 2021 +0000  refs/tags/v0.0.185
Thu Jul 29 13:31:07 2021 +0000  refs/tags/v0.0.184
```

This would make goreleaser attempt to release that existing tag again, and fail.

If we instead sort by reversed `refname` we get the tags ordered by their numeric value, which ignore the day of the week of release:
```
git tag --points-at HEAD --sort=-version:refname --format='%(creatordate)%09%(refname)'
Thu Jul 29 13:57:44 2021 +0000  refs/tags/v0.0.186
Thu Jul 29 13:38:42 2021 +0000  refs/tags/v0.0.185
Thu Jul 29 13:31:07 2021 +0000  refs/tags/v0.0.184
Wed Jul 28 07:13:19 2021 +0000  refs/tags/v0.0.183
```

Allowing the latest version, 0.0.186 in this case, to be targeted for release.

* corrected test case

* add space

* remove space
2021-08-02 16:20:09 +00:00
Carlos Alexandro Becker
b176b1ff80
feat: inc parts of semver, change snapshot default name (#2358) 2021-07-24 10:13:05 -03:00
Carlos Alexandro Becker
bad1132e78
feat: --auto-snapshot on dirty git tree (#2286)
* feat: --auto-snapshot

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* docs: fix

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* fix: workflow

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-06-04 23:09:12 -03:00
Carlos Alexandro Becker
5866b9cb63
refactor: use os and io packages intead of ioutil when possible (#2189) 2021-04-25 13:00:51 -03:00
Carlos Alexandro Becker
66117f3126
fix: several fd leaks (on tests) (#2187) 2021-04-25 11:34:40 -03:00
Carlos Alexandro Becker
be4049e6d8 fix: move shallow clone error to warning
refs #2141 #2134

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-03-24 23:17:40 -03:00
Carlos Alexandro Becker
d04a7dad19
feat: fail on shallow clone (#2135)
* feat: fail on shallow clone

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: typo

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-03-24 08:55:13 -03:00
CrazyMax
f10873d919
Revert "feat: allow automatic snapshot on dirty state (#1958)" (#1962)
This reverts commit d8a0f253d1.
2020-12-22 11:04:51 -03:00
CrazyMax
d8a0f253d1
feat: allow automatic snapshot on dirty state (#1958)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2020-12-22 10:41:08 -03:00
Carlos Alexandro Becker
92f52ac406
refactor(test): use testing.TB Cleanup and Tempdir (#1945)
* refactor: use t.Cleanup instead of defer

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* refactor: use t.Cleanup instead of defer

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* refactor: use t.Cleanup instead of defer

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* refactor: use t.Cleanup instead of defer

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: filepath

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-12-12 13:27:35 -03:00
Ben Kochie
f417d7783d
feat: add support for git branch in templates (#1906)
Add a `.Branch` field to the text templates populated by the current git
branch.

Signed-off-by: Ben Kochie <superq@gmail.com>

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-11-18 18:50:31 +00:00
Carlos Alexandro Becker
979f8632b7
refactor: use require on all tests (#1839)
* refactor: use require on all tests

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* refactor: use require on all tests

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-10-06 12:48:04 +00:00
Carlos Alexandro Becker
65ffbf1921
refactor: replace pkg/errors.Wrap with fmt.Errorf (#1812)
* refactor: remove pkg/errors

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* refactor: remove pkg/errors

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-09-21 17:47:51 +00:00
Carlos Alexandro Becker
01942ae60d
refactor: use git tag --points-at (#1796)
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-09-08 10:11:59 -03:00
Paul Tyng
0d4f605388
feat: deterministic / reproducible build support (#1641)
* Make checksum ordering consistent

* Use consistent time for build date

* Add commit date to templates

* Add config option for build mod timestamp

* Make goreleaser builds reproducible

* Fix error in wording

* Update www/docs/customization/build.md
2020-07-06 17:09:22 -03:00
Carlos Alexandro Becker
69c8a502db
chore(deps): bump github.com/golangci/golangci-lint from 1.23.7 to 1.27.0 (#1563)
* chore(deps): bump github.com/golangci/golangci-lint from 1.23.7 to 1.27.0

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: tests

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-05-26 00:48:10 -03:00
hackerman
ca3a63a537
feat: use CI environment variables to figure out tag (#1327)
* fix(git): Use CI envronment variables to figure out tag

This patch detects CI environments and uses the available tag information when
collecting the git tag.

This resolves issues where one commit has multiple tags.

Closes #1163
Closes #1311

* Update www/content/release.md

Co-Authored-By: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* Update www/content/release.md

Co-Authored-By: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* Update www/content/build.md

Co-Authored-By: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* Update www/content/release.md

Co-Authored-By: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* feat(doc): Document git tag override in environment

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2020-01-31 15:38:56 -03:00
Dave Wongillies
21df6b816f
fix: use long git arg for quiet (#1325) 2020-01-31 00:20:36 -03:00
Carlos Alexandro Becker
449ed95bbe
Revert "fix: getTag return incorrect tag, if we have more than 1 tag for 1 commit (#1164)"
This reverts commit 2403a40979.
2019-10-21 09:09:11 -03:00
Carlos Alexandro Becker
4e71977e34
Revert "feat: git diff when dirty (#1178)"
This reverts commit 39d07c375d.
2019-10-20 11:10:31 -03:00
Andrii Soldatenko
2403a40979 fix: getTag return incorrect tag, if we have more than 1 tag for 1 commit (#1164)
* fix strategy of getting latest tag

* add git -c "versionsort.suffix=-"

* fix test

* fix tests

* add more details about change
2019-10-07 13:58:19 -03:00
Carlos Alexandro Becker
39d07c375d
feat: git diff when dirty (#1178)
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2019-10-06 17:56:53 -03:00
Carlos Alexandro Becker
1a971c0d9a
test: fixed git dirty test 2019-04-14 14:41:24 -03:00
Carlos Alexandro Becker
a62314d9bb
fix: small error msg improvement
refs #1005
2019-04-14 14:16:53 -03:00
Carlos Alexandro Becker
adcc4524da
fix: suppress diffs on git show (#955) 2019-02-06 17:51:09 -02:00
Carlos Alexandro Becker
742c8d03aa clean: removed uneeded param 2019-01-19 18:14:32 -02:00
Carlos Alexandro Becker
59f10ad083 clean: removed deprecated git.short_hash option 2019-01-19 18:14:32 -02:00
Carlos Alexandro Becker
ed2ca57bd5 clean: unused err 2019-01-19 17:33:33 -02:00
Carlos Alexandro Becker
a31abde2e9 clean: remove uneeded extra tag check 2019-01-19 17:33:33 -02:00
Carlos Alexandro Becker
07d9855890 fix: tests 2018-12-13 12:11:12 -02:00
Carlos Alexandro Becker
a69ef61d60 fix: snapshot version handling 2018-12-13 12:11:12 -02:00
Carlos Alexandro Becker
18efb4a5c2 fix: change defaults order 2018-11-25 18:25:38 -02:00
Carlos Alexandro Becker
6c349c1759 fix: linter fixes 2018-11-08 09:40:23 -02:00
Carlos Alexandro Becker
5c63f88290 test: add more tests 2018-10-04 23:23:31 -03:00
Carlos Alexandro Becker
748d97ef22 feat: git remote url in the template engine 2018-10-04 23:23:31 -03:00
Carlos Alexandro Becker
af99acf244 feat: add new template fields 2018-10-04 09:23:06 -03:00
Carlos Alexandro Becker
39de856eb4
refactor: better package organization 2018-09-12 14:18:01 -03:00