From 3c1f5042c8deff490ad7f817b9bd65156690c5df Mon Sep 17 00:00:00 2001 From: William Petit Date: Fri, 25 Aug 2023 09:56:28 -0600 Subject: [PATCH] feat: use new versioning schema with changelog generation --- .chglog/CHANGELOG.tpl.md | 44 +++ .chglog/config.yml | 33 +++ .gitignore | 3 +- CHANGELOG.md | 604 +++++++++++++++++++++++++++++++++++++++ Jenkinsfile | 5 +- Makefile | 63 ++-- 6 files changed, 712 insertions(+), 40 deletions(-) create mode 100644 .chglog/CHANGELOG.tpl.md create mode 100644 .chglog/config.yml create mode 100644 CHANGELOG.md diff --git a/.chglog/CHANGELOG.tpl.md b/.chglog/CHANGELOG.tpl.md new file mode 100644 index 0000000..1aa5e5c --- /dev/null +++ b/.chglog/CHANGELOG.tpl.md @@ -0,0 +1,44 @@ +{{ if .Versions -}} +{{ if .Unreleased.CommitGroups -}} + +## [Unreleased] + +{{ range .Unreleased.CommitGroups -}} +### {{ .Title }} +{{ range .Commits -}} +- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} +{{ end }} +{{ end -}} +{{ end -}} +{{ end -}} + +{{ range .Versions }} + +## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }} +{{ range .CommitGroups -}} +### {{ .Title }} +{{ range .Commits -}} +- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} +{{ end }} +{{ else }} +_Nothing functionally significant._ +{{ end -}} + +{{- if .NoteGroups -}} +{{ range .NoteGroups -}} +### {{ .Title }} +{{ range .Notes }} +{{ .Body }} +{{ end }} +{{ end -}} +{{ end -}} +{{ end -}} + +{{- if .Versions }} +[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD +{{ range .Versions -}} +{{ if .Tag.Previous -}} +[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }} +{{ end -}} +{{ end -}} +{{ end -}} diff --git a/.chglog/config.yml b/.chglog/config.yml new file mode 100644 index 0000000..d216adc --- /dev/null +++ b/.chglog/config.yml @@ -0,0 +1,33 @@ +style: github +template: CHANGELOG.tpl.md +info: + title: CHANGELOG + repository_url: https://forge.cadoles.com// +options: + commits: + filters: + Type: + - feat + - fix + - perf + - refactor + - docs + commit_groups: + title_maps: + feat: Features + fix: Bug Fixes + perf: Performance Improvements + refactor: Code Refactoring + docs: Documentation + header: + pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$" + pattern_maps: + - Type + - Scope + - Subject + notes: + keywords: + - BREAKING CHANGE + issues: + prefix: + - '#' diff --git a/.gitignore b/.gitignore index 7cd102b..665c07b 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ dist/ /apps /server-key.json /.emissary-token -/out \ No newline at end of file +/out +.mktools/ diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..912c3ba --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,604 @@ + +## [Unreleased] + +### Documentation +- add reference to emissary-firmware project + +### Features +- comment packaged agent and server configurations ([#1](https://forge.cadoles.com/issues/1)) + + + +## [v2023.8.25-a1ec5b8] - 2023-08-25 + +_Nothing functionally significant._ + + +## [v2023.8.25-5c36955] - 2023-08-25 + +_Nothing functionally significant._ + + +## [v2023.8.14-6cf01ad] - 2023-08-14 + +_Nothing functionally significant._ + + +## [v2023.8.14-8e88b5a] - 2023-07-26 +### Features +- **auth:** remote and local third-party authentication + + + +## [v2023.6.25-42d49eb] - 2023-06-25 +### Features +- move client to public package + + + +## [v2023.6.23-4217850] - 2023-06-23 + +_Nothing functionally significant._ + + +## [v2023.6.23-4a58847] - 2023-06-23 + +_Nothing functionally significant._ + + +## [v2023.6.23-4255940] - 2023-06-23 + +_Nothing functionally significant._ + + +## [v2023.6.22-a5fbe3e] - 2023-06-22 + +_Nothing functionally significant._ + + +## [v2023.6.22-8b5a97d] - 2023-06-22 + +_Nothing functionally significant._ + + +## [v2023.5.26-d73e027] - 2023-05-26 + +_Nothing functionally significant._ + + +## [v2023.5.25-054744e] - 2023-05-25 +### Bug Fixes +- systemd units + + + +## [v2023.5.23-4311cf6] - 2023-05-23 + +_Nothing functionally significant._ + + +## [v2023.5.23-ece97ef] - 2023-05-23 + +_Nothing functionally significant._ + + +## [v2023.5.24-58ef3b0] - 2023-05-23 + +_Nothing functionally significant._ + + +## [v2023.5.24-e568092] - 2023-05-23 + +_Nothing functionally significant._ + + +## [v2023.4.26-6a976c0] - 2023-04-26 +### Features +- update arcad/edge dependency + + + +## [v2023.4.25-d188af8] - 2023-04-25 + +_Nothing functionally significant._ + + +## [v2023.4.24-e975381] - 2023-04-24 + +_Nothing functionally significant._ + + +## [v2023.4.24-0d03a70] - 2023-04-24 +### Features +- update arcad/edge dependency + + + +## [v2023.4.21-64ea0e0] - 2023-04-21 +### Features +- update arcad/edge dependency + + + +## [v2023.4.21-541d30d] - 2023-04-21 + +_Nothing functionally significant._ + + +## [v2023.4.21-87a4509] - 2023-04-21 +### Features +- update arcad/edge dependency + + + +## [v2023.4.20-fcd159c] - 2023-04-20 +### Features +- update arcad/edge dependency + + + +## [v2023.4.20-ef3048b] - 2023-04-20 + +_Nothing functionally significant._ + + +## [v2023.4.20-3d01cf0] - 2023-04-20 +### Features +- update arcad/edge dependency + + + +## [v2023.4.14-813f837] - 2023-04-14 +### Features +- update arcad/edge dependency + + + +## [v2023.4.13-ed35ee5] - 2023-04-13 +### Features +- update arcad/edge dependency + + + +## [v2023.4.13-4b5bc0b] - 2023-04-13 +### Features +- update arcad/edge dependency + + + +## [v2023.4.13-dee6218] - 2023-04-13 +### Features +- update arcad/edge dependency + + + +## [v2023.4.13-76656e8] - 2023-04-13 +### Features +- update arcad/edge dependency + + + +## [v2023.4.13-41b1619] - 2023-04-13 +### Features +- update arcad/edge dependency + + + +## [v2023.4.12-35d5ee8] - 2023-04-12 +### Features +- **datastore:** add basic testsuite for agent repository + + + +## [v2023.4.11-2315ee7] - 2023-04-11 +### Features +- update arcad/edge dependency + + + +## [v2023.4.11-86a6d81] - 2023-04-11 + +_Nothing functionally significant._ + + +## [v2023.4.11-8fb86c6] - 2023-04-11 +### Features +- update arcad/edge dependency + + + +## [v2023.4.6-12f8b3a] - 2023-04-06 +### Features +- update arcad/edge dependency + + + +## [v2023.4.6-4cf53d9] - 2023-04-06 + +_Nothing functionally significant._ + + +## [v2023.4.6-34e4769] - 2023-04-06 +### Features +- update edge dependency + + + +## [v2023.4.6-47c2546] - 2023-04-06 + +_Nothing functionally significant._ + + +## [v2023.4.6-2117391] - 2023-04-06 +### Features +- update edge dependency + + + +## [v2023.4.6-b213b8d] - 2023-04-06 + +_Nothing functionally significant._ + + +## [v2023.4.6-9dcddc5] - 2023-04-06 +### Features +- **sqlite:** use busy_timeout pragma to prevent database locking errors + + + +## [v2023.4.6-253c93d] - 2023-04-06 + +_Nothing functionally significant._ + + +## [v2023.4.6-d2f865c] - 2023-04-06 + +_Nothing functionally significant._ + + +## [v2023.4.6-7ee4344] - 2023-04-06 +### Bug Fixes +- **jenkins:** do not trigger emissary-firmware with dirty tag + + + +## [v2023.4.6-18eb2d3] - 2023-04-06 +### Bug Fixes +- **jenkins:** do not trigger emissary-firmware with dirty tag + + + +## [v2023.4.6-06b1235] - 2023-04-06 + +_Nothing functionally significant._ + + +## [v2023.4.5-2e1ee44] - 2023-04-05 + +_Nothing functionally significant._ + + +## [v2023.4.4-242a247] - 2023-04-04 +### Features +- add mdns controller + + + +## [v2023.4.2-562d698] - 2023-04-02 + +_Nothing functionally significant._ + + +## [v2023.4.1-909549f] - 2023-04-01 +### Features +- **agent:** do not block execution of controllers on error + + + +## [v2023.4.1-7d551a8] - 2023-04-01 +### Features +- **auth:** accept clock skew for token validation + + + +## [v2023.4.1-d02eb91] - 2023-04-01 +### Features +- **agent:** add contactedAt attribute to agent + + + +## [v2023.4.1-d2bcdd2] - 2023-04-01 + +_Nothing functionally significant._ + + +## [v2023.3.31-c638fe1] - 2023-03-31 +### Features +- **sqlite:** add default pragmas to dsn + + + +## [v2023.3.31-dff95c7] - 2023-03-31 + +_Nothing functionally significant._ + + +## [v2023.3.31-5fc5f5f] - 2023-03-31 + +_Nothing functionally significant._ + + +## [v2023.3.29-e5b6c5e] - 2023-03-29 +### Features +- **auth:** use utc time + + + +## [v2023.3.29-351f22e] - 2023-03-29 + +_Nothing functionally significant._ + + +## [v2023.3.29-854a6ae] - 2023-03-29 + +_Nothing functionally significant._ + + +## [v2023.3.29-854a6ae-dirty] - 2023-03-29 + +_Nothing functionally significant._ + + +## [v2023.3.29-a48c2eb] - 2023-03-29 + +_Nothing functionally significant._ + + +## [v2023.3.28-cdd78e4] - 2023-03-28 + +_Nothing functionally significant._ + + +## [v2023.3.28-e832b7d-dirty] - 2023-03-28 + +_Nothing functionally significant._ + + +## [v2023.3.28-e832b7d] - 2023-03-28 +### Features +- move proxy package from arcad/edge + + + +## [v2023.3.27-f7d70da] - 2023-03-27 + +_Nothing functionally significant._ + + +## [v2023.3.27-24b7519] - 2023-03-27 + +_Nothing functionally significant._ + + +## [v2023.3.27-a9e5263] - 2023-03-27 + +_Nothing functionally significant._ + + +## [v2023.3.26-56063a6] - 2023-03-26 + +_Nothing functionally significant._ + + +## [v2023.3.22-97a60e2] - 2023-03-22 + +_Nothing functionally significant._ + + +## [v2023.3.24-97a60e2-dirty] - 2023-03-22 + +_Nothing functionally significant._ + + +## [v2023.3.22-cd796ff] - 2023-03-22 + +_Nothing functionally significant._ + + +## [cd796ff] - 2023-03-22 +### Features +- host-based routing in proxy + + + +## [8ada7e3] - 2023-03-21 + +_Nothing functionally significant._ + + +## [1261beb] - 2023-03-21 +### Features +- rename gateway spec to proxy +- **agent:** execute reconciliation loop directly at startup + + + +## [fa36d55] - 2023-03-13 +### Features +- basic authorization model + + + +## [258d0bc] - 2023-03-10 +### Features +- rename client subcommand as api + + + +## [0a3760b] - 2023-03-09 + +_Nothing functionally significant._ + + +## [b53842c] - 2023-03-09 + +_Nothing functionally significant._ + + +## [a297821] - 2023-03-08 +### Features +- use auth token with all client commands + + + +## [9aca9a6] - 2023-03-08 +### Features +- authenticate users and agents requests + + + +## [bd0d5a6] - 2023-03-03 + +_Nothing functionally significant._ + + +## [e13de5b] - 2023-03-02 +### Bug Fixes +- **packaging:** agent default configuration + +### Features +- **agent:** add config sub commands + + + +## [f9b8d4f] - 2023-03-02 +### Bug Fixes +- **packaging:** create required directories + improve alpine service startup + + + +## [1ff29ae] - 2023-03-02 +### Features +- agent metadata with custom collectors + + + +## [3310c09] - 2023-02-28 +### Features +- cli client with spec schema validation + + + +## [2a828af] - 2023-02-22 + +_Nothing functionally significant._ + + +## [088b684] - 2023-02-02 +### Features +- initial commit + + + +## [d3c238f] - 2023-02-02 +### Features +- initial commit + + + +## a567e47 - 2023-02-02 +### Features +- initial commit + + +[Unreleased]: https://forge.cadoles.com/compare/v2023.8.25-a1ec5b8...HEAD +[v2023.8.25-a1ec5b8]: https://forge.cadoles.com/compare/v2023.8.25-5c36955...v2023.8.25-a1ec5b8 +[v2023.8.25-5c36955]: https://forge.cadoles.com/compare/v2023.8.14-6cf01ad...v2023.8.25-5c36955 +[v2023.8.14-6cf01ad]: https://forge.cadoles.com/compare/v2023.8.14-8e88b5a...v2023.8.14-6cf01ad +[v2023.8.14-8e88b5a]: https://forge.cadoles.com/compare/v2023.6.25-42d49eb...v2023.8.14-8e88b5a +[v2023.6.25-42d49eb]: https://forge.cadoles.com/compare/v2023.6.23-4217850...v2023.6.25-42d49eb +[v2023.6.23-4217850]: https://forge.cadoles.com/compare/v2023.6.23-4a58847...v2023.6.23-4217850 +[v2023.6.23-4a58847]: https://forge.cadoles.com/compare/v2023.6.23-4255940...v2023.6.23-4a58847 +[v2023.6.23-4255940]: https://forge.cadoles.com/compare/v2023.6.22-a5fbe3e...v2023.6.23-4255940 +[v2023.6.22-a5fbe3e]: https://forge.cadoles.com/compare/v2023.6.22-8b5a97d...v2023.6.22-a5fbe3e +[v2023.6.22-8b5a97d]: https://forge.cadoles.com/compare/v2023.5.26-d73e027...v2023.6.22-8b5a97d +[v2023.5.26-d73e027]: https://forge.cadoles.com/compare/v2023.5.25-054744e...v2023.5.26-d73e027 +[v2023.5.25-054744e]: https://forge.cadoles.com/compare/v2023.5.23-4311cf6...v2023.5.25-054744e +[v2023.5.23-4311cf6]: https://forge.cadoles.com/compare/v2023.5.23-ece97ef...v2023.5.23-4311cf6 +[v2023.5.23-ece97ef]: https://forge.cadoles.com/compare/v2023.5.24-58ef3b0...v2023.5.23-ece97ef +[v2023.5.24-58ef3b0]: https://forge.cadoles.com/compare/v2023.5.24-e568092...v2023.5.24-58ef3b0 +[v2023.5.24-e568092]: https://forge.cadoles.com/compare/v2023.4.26-6a976c0...v2023.5.24-e568092 +[v2023.4.26-6a976c0]: https://forge.cadoles.com/compare/v2023.4.25-d188af8...v2023.4.26-6a976c0 +[v2023.4.25-d188af8]: https://forge.cadoles.com/compare/v2023.4.24-e975381...v2023.4.25-d188af8 +[v2023.4.24-e975381]: https://forge.cadoles.com/compare/v2023.4.24-0d03a70...v2023.4.24-e975381 +[v2023.4.24-0d03a70]: https://forge.cadoles.com/compare/v2023.4.21-64ea0e0...v2023.4.24-0d03a70 +[v2023.4.21-64ea0e0]: https://forge.cadoles.com/compare/v2023.4.21-541d30d...v2023.4.21-64ea0e0 +[v2023.4.21-541d30d]: https://forge.cadoles.com/compare/v2023.4.21-87a4509...v2023.4.21-541d30d +[v2023.4.21-87a4509]: https://forge.cadoles.com/compare/v2023.4.20-fcd159c...v2023.4.21-87a4509 +[v2023.4.20-fcd159c]: https://forge.cadoles.com/compare/v2023.4.20-ef3048b...v2023.4.20-fcd159c +[v2023.4.20-ef3048b]: https://forge.cadoles.com/compare/v2023.4.20-3d01cf0...v2023.4.20-ef3048b +[v2023.4.20-3d01cf0]: https://forge.cadoles.com/compare/v2023.4.14-813f837...v2023.4.20-3d01cf0 +[v2023.4.14-813f837]: https://forge.cadoles.com/compare/v2023.4.13-ed35ee5...v2023.4.14-813f837 +[v2023.4.13-ed35ee5]: https://forge.cadoles.com/compare/v2023.4.13-4b5bc0b...v2023.4.13-ed35ee5 +[v2023.4.13-4b5bc0b]: https://forge.cadoles.com/compare/v2023.4.13-dee6218...v2023.4.13-4b5bc0b +[v2023.4.13-dee6218]: https://forge.cadoles.com/compare/v2023.4.13-76656e8...v2023.4.13-dee6218 +[v2023.4.13-76656e8]: https://forge.cadoles.com/compare/v2023.4.13-41b1619...v2023.4.13-76656e8 +[v2023.4.13-41b1619]: https://forge.cadoles.com/compare/v2023.4.12-35d5ee8...v2023.4.13-41b1619 +[v2023.4.12-35d5ee8]: https://forge.cadoles.com/compare/v2023.4.11-2315ee7...v2023.4.12-35d5ee8 +[v2023.4.11-2315ee7]: https://forge.cadoles.com/compare/v2023.4.11-86a6d81...v2023.4.11-2315ee7 +[v2023.4.11-86a6d81]: https://forge.cadoles.com/compare/v2023.4.11-8fb86c6...v2023.4.11-86a6d81 +[v2023.4.11-8fb86c6]: https://forge.cadoles.com/compare/v2023.4.6-12f8b3a...v2023.4.11-8fb86c6 +[v2023.4.6-12f8b3a]: https://forge.cadoles.com/compare/v2023.4.6-4cf53d9...v2023.4.6-12f8b3a +[v2023.4.6-4cf53d9]: https://forge.cadoles.com/compare/v2023.4.6-34e4769...v2023.4.6-4cf53d9 +[v2023.4.6-34e4769]: https://forge.cadoles.com/compare/v2023.4.6-47c2546...v2023.4.6-34e4769 +[v2023.4.6-47c2546]: https://forge.cadoles.com/compare/v2023.4.6-2117391...v2023.4.6-47c2546 +[v2023.4.6-2117391]: https://forge.cadoles.com/compare/v2023.4.6-b213b8d...v2023.4.6-2117391 +[v2023.4.6-b213b8d]: https://forge.cadoles.com/compare/v2023.4.6-9dcddc5...v2023.4.6-b213b8d +[v2023.4.6-9dcddc5]: https://forge.cadoles.com/compare/v2023.4.6-253c93d...v2023.4.6-9dcddc5 +[v2023.4.6-253c93d]: https://forge.cadoles.com/compare/v2023.4.6-d2f865c...v2023.4.6-253c93d +[v2023.4.6-d2f865c]: https://forge.cadoles.com/compare/v2023.4.6-7ee4344...v2023.4.6-d2f865c +[v2023.4.6-7ee4344]: https://forge.cadoles.com/compare/v2023.4.6-18eb2d3...v2023.4.6-7ee4344 +[v2023.4.6-18eb2d3]: https://forge.cadoles.com/compare/v2023.4.6-06b1235...v2023.4.6-18eb2d3 +[v2023.4.6-06b1235]: https://forge.cadoles.com/compare/v2023.4.5-2e1ee44...v2023.4.6-06b1235 +[v2023.4.5-2e1ee44]: https://forge.cadoles.com/compare/v2023.4.4-242a247...v2023.4.5-2e1ee44 +[v2023.4.4-242a247]: https://forge.cadoles.com/compare/v2023.4.2-562d698...v2023.4.4-242a247 +[v2023.4.2-562d698]: https://forge.cadoles.com/compare/v2023.4.1-909549f...v2023.4.2-562d698 +[v2023.4.1-909549f]: https://forge.cadoles.com/compare/v2023.4.1-7d551a8...v2023.4.1-909549f +[v2023.4.1-7d551a8]: https://forge.cadoles.com/compare/v2023.4.1-d02eb91...v2023.4.1-7d551a8 +[v2023.4.1-d02eb91]: https://forge.cadoles.com/compare/v2023.4.1-d2bcdd2...v2023.4.1-d02eb91 +[v2023.4.1-d2bcdd2]: https://forge.cadoles.com/compare/v2023.3.31-c638fe1...v2023.4.1-d2bcdd2 +[v2023.3.31-c638fe1]: https://forge.cadoles.com/compare/v2023.3.31-dff95c7...v2023.3.31-c638fe1 +[v2023.3.31-dff95c7]: https://forge.cadoles.com/compare/v2023.3.31-5fc5f5f...v2023.3.31-dff95c7 +[v2023.3.31-5fc5f5f]: https://forge.cadoles.com/compare/v2023.3.29-e5b6c5e...v2023.3.31-5fc5f5f +[v2023.3.29-e5b6c5e]: https://forge.cadoles.com/compare/v2023.3.29-351f22e...v2023.3.29-e5b6c5e +[v2023.3.29-351f22e]: https://forge.cadoles.com/compare/v2023.3.29-854a6ae...v2023.3.29-351f22e +[v2023.3.29-854a6ae]: https://forge.cadoles.com/compare/v2023.3.29-854a6ae-dirty...v2023.3.29-854a6ae +[v2023.3.29-854a6ae-dirty]: https://forge.cadoles.com/compare/v2023.3.29-a48c2eb...v2023.3.29-854a6ae-dirty +[v2023.3.29-a48c2eb]: https://forge.cadoles.com/compare/v2023.3.28-cdd78e4...v2023.3.29-a48c2eb +[v2023.3.28-cdd78e4]: https://forge.cadoles.com/compare/v2023.3.28-e832b7d-dirty...v2023.3.28-cdd78e4 +[v2023.3.28-e832b7d-dirty]: https://forge.cadoles.com/compare/v2023.3.28-e832b7d...v2023.3.28-e832b7d-dirty +[v2023.3.28-e832b7d]: https://forge.cadoles.com/compare/v2023.3.27-f7d70da...v2023.3.28-e832b7d +[v2023.3.27-f7d70da]: https://forge.cadoles.com/compare/v2023.3.27-24b7519...v2023.3.27-f7d70da +[v2023.3.27-24b7519]: https://forge.cadoles.com/compare/v2023.3.27-a9e5263...v2023.3.27-24b7519 +[v2023.3.27-a9e5263]: https://forge.cadoles.com/compare/v2023.3.26-56063a6...v2023.3.27-a9e5263 +[v2023.3.26-56063a6]: https://forge.cadoles.com/compare/v2023.3.22-97a60e2...v2023.3.26-56063a6 +[v2023.3.22-97a60e2]: https://forge.cadoles.com/compare/v2023.3.24-97a60e2-dirty...v2023.3.22-97a60e2 +[v2023.3.24-97a60e2-dirty]: https://forge.cadoles.com/compare/v2023.3.22-cd796ff...v2023.3.24-97a60e2-dirty +[v2023.3.22-cd796ff]: https://forge.cadoles.com/compare/cd796ff...v2023.3.22-cd796ff +[cd796ff]: https://forge.cadoles.com/compare/8ada7e3...cd796ff +[8ada7e3]: https://forge.cadoles.com/compare/1261beb...8ada7e3 +[1261beb]: https://forge.cadoles.com/compare/fa36d55...1261beb +[fa36d55]: https://forge.cadoles.com/compare/258d0bc...fa36d55 +[258d0bc]: https://forge.cadoles.com/compare/0a3760b...258d0bc +[0a3760b]: https://forge.cadoles.com/compare/b53842c...0a3760b +[b53842c]: https://forge.cadoles.com/compare/a297821...b53842c +[a297821]: https://forge.cadoles.com/compare/9aca9a6...a297821 +[9aca9a6]: https://forge.cadoles.com/compare/bd0d5a6...9aca9a6 +[bd0d5a6]: https://forge.cadoles.com/compare/e13de5b...bd0d5a6 +[e13de5b]: https://forge.cadoles.com/compare/f9b8d4f...e13de5b +[f9b8d4f]: https://forge.cadoles.com/compare/1ff29ae...f9b8d4f +[1ff29ae]: https://forge.cadoles.com/compare/3310c09...1ff29ae +[3310c09]: https://forge.cadoles.com/compare/2a828af...3310c09 +[2a828af]: https://forge.cadoles.com/compare/088b684...2a828af +[088b684]: https://forge.cadoles.com/compare/d3c238f...088b684 +[d3c238f]: https://forge.cadoles.com/compare/a567e47...d3c238f diff --git a/Jenkinsfile b/Jenkinsfile index 3bc73e8..551868c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -58,7 +58,10 @@ pipeline { passwordVariable: 'GITEA_RELEASE_PASSWORD' ]) ]) { - sh 'make gitea-release' + sh ''' + make mktools + make gitea-release + ''' } def currentVersion = sh(returnStdout: true, script: 'make full-version').trim() if (currentVersion.endsWith('-dirty')) { diff --git a/Makefile b/Makefile index 7e87f33..398ae43 100644 --- a/Makefile +++ b/Makefile @@ -5,12 +5,9 @@ GITCHLOG_ARGS ?= SHELL := /bin/bash EMISSARY_VERSION ?= -GIT_VERSION := $(shell git describe --always) -DATE_VERSION := $(shell date +%Y.%-m.%-d) -FULL_VERSION := v$(DATE_VERSION)-$(GIT_VERSION)$(if $(shell git diff --stat),-dirty,) DOCKER_IMAGE_NAME ?= bornholm/emissary -DOCKER_IMAGE_TAG ?= $(FULL_VERSION) +DOCKER_IMAGE_TAG ?= $(MKT_PROJECT_VERSION) GOTEST_ARGS ?= -short @@ -45,7 +42,7 @@ build-emissary-%: deps ## Build executable -v \ -ldflags "\ -X 'main.GitRef=$(shell git rev-parse --short HEAD)' \ - -X 'main.ProjectVersion=$(FULL_VERSION)' \ + -X 'main.ProjectVersion=$(MKT_PROJECT_VERSION)' \ -X 'main.BuildDate=$(shell date --utc --rfc-3339=seconds)' \ " \ -o ./bin/$* \ @@ -66,7 +63,7 @@ run-emissary-%: .env ( set -o allexport && source .env && set +o allexport && bin/$* $(EMISSARY_CMD)) .PHONY: deps -deps: .env +deps: .env .mktools .PHONY: dump-config dump-config: build-emissary @@ -74,27 +71,8 @@ dump-config: build-emissary ./bin/emissary config dump > tmp/config.yml .PHONY: goreleaser -goreleaser: deps - ( set -o allexport && source .env && set +o allexport && VERSION=$(GORELEASER_VERSION) curl -sfL https://goreleaser.com/static/run | GORELEASER_CURRENT_TAG="$(FULL_VERSION)" bash /dev/stdin $(GORELEASER_ARGS) ) - -.PHONY: start-release -start-release: - if [ -z "$(EMISSARY_VERSION)" ]; then echo "You must define environment variable FAQD_VERSION"; exit 1; fi - - git flow release start $(EMISSARY_VERSION) - - # Update package.json version - jq '.version = "$(EMISSARY_VERSION)"' package.json | sponge package.json - git add package.json - git commit -m "chore: bump to version $(EMISSARY_VERSION)" --allow-empty - - echo "Commit you additional modifications then execute 'make finish-release'" - -.PHONY: finish-release -finish-release: - git flow release finish -m "v$(EMISSARY_VERSION)" - git push --all - git push --tags +goreleaser: .mktools + ( set -o allexport && source .env && set +o allexport && VERSION=$(GORELEASER_VERSION) curl -sfL https://goreleaser.com/static/run | GORELEASER_CURRENT_TAG="$(MKT_PROJECT_VERSION)" bash /dev/stdin $(GORELEASER_ARGS) ) install-git-hooks: git config core.hooksPath .githooks @@ -119,7 +97,7 @@ deploy-openwrt-agent: scp dist/emissary-agent_linux_arm_6/emissary root@$(OPENWRT_DEVICE):/usr/bin/emissary ssh root@$(OPENWRT_DEVICE) /etc/init.d/emissary-agent start -gitea-release: tools/gitea-release/bin/gitea-release.sh goreleaser +gitea-release: .mktools tools/gitea-release/bin/gitea-release.sh goreleaser mkdir -p .gitea-release rm -rf .gitea-release/* @@ -130,19 +108,14 @@ gitea-release: tools/gitea-release/bin/gitea-release.sh goreleaser GITEA_RELEASE_PROJECT="emissary" \ GITEA_RELEASE_ORG="arcad" \ GITEA_RELEASE_BASE_URL="https://forge.cadoles.com" \ - GITEA_RELEASE_VERSION="$(FULL_VERSION)" \ - GITEA_RELEASE_NAME="$(FULL_VERSION)" \ + GITEA_RELEASE_VERSION="$(MKT_PROJECT_VERSION)" \ + GITEA_RELEASE_NAME="$(MKT_PROJECT_VERSION)" \ GITEA_RELEASE_COMMITISH_TARGET="$(GIT_VERSION)" \ GITEA_RELEASE_IS_DRAFT="false" \ GITEA_RELEASE_BODY="" \ GITEA_RELEASE_ATTACHMENTS="$$(find .gitea-release/* -type f)" \ tools/gitea-release/bin/gitea-release.sh -tools/gitea-release/bin/gitea-release.sh: - mkdir -p tools/gitea-release/bin - curl --output tools/gitea-release/bin/gitea-release.sh https://forge.cadoles.com/Cadoles/Jenkins/raw/branch/master/resources/com/cadoles/gitea/gitea-release.sh - chmod +x tools/gitea-release/bin/gitea-release.sh - .emissary-token: $(MAKE) run-emissary-server EMISSARY_CMD="--debug --config tmp/server.yml server auth create-token --role writer > .emissary-token" @@ -153,8 +126,8 @@ load-sample-specs: cat misc/spec-samples/proxy.emissary.cadoles.com.json | ./bin/server api agent spec update -a $(AGENT_ID) --no-patch --spec-data - --spec-name proxy.emissary.cadoles.com cat misc/spec-samples/mdns.emissary.cadoles.com.json | ./bin/server api agent spec update -a $(AGENT_ID) --no-patch --spec-data - --spec-name mdns.emissary.cadoles.com -full-version: - @echo $(FULL_VERSION) +version: .mktools + @echo $(MKT_PROJECT_VERSION) update-edge-lib: git pull --rebase @@ -163,4 +136,18 @@ update-edge-lib: $(MAKE) test git add go.mod go.sum git commit -m "feat: update arcad/edge dependency" - git push \ No newline at end of file + git push + +.PHONY: changelog +changelog: .mktools + $(MAKE) mkt-changelog + +.PHONY: mktools +mktools: + rm -rf .mktools + curl -q https://forge.cadoles.com/Cadoles/mktools/raw/branch/master/install.sh | $(SHELL) + +.mktools: + $(MAKE) mktools + +-include .mktools/*.mk \ No newline at end of file