You've already forked go-semantic-release
Compare commits
1 Commits
v2.2.5
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3131b8b0ee |
@@ -1,10 +1,2 @@
|
|||||||
*
|
*
|
||||||
!build/
|
!build/
|
||||||
!cmd/
|
|
||||||
!internal/
|
|
||||||
!pkg/
|
|
||||||
!scripts/
|
|
||||||
!Dockerfile*
|
|
||||||
!.dockerignore
|
|
||||||
!go.mod
|
|
||||||
!go.sum
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Run the script and get the return code if successful of if fails
|
|
||||||
./scripts/commit-filter-check.sh && rc=$? || rc=$?
|
|
||||||
echo return code : $rc
|
|
||||||
if [ ${rc} = 1 ]; then
|
|
||||||
echo "Script return code 1 so commit failed"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
echo "No error returned so commit successful"
|
|
||||||
fi
|
|
||||||
31
.release.yml
31
.release.yml
@@ -1,29 +1,32 @@
|
|||||||
release: "gitea"
|
release: "github"
|
||||||
gitea:
|
github:
|
||||||
repo: "go-semantic-release"
|
repo: "go-semantic-release"
|
||||||
user: "cybercinch"
|
user: "nightapes"
|
||||||
url: "https://hub.cybercinch.nz"
|
|
||||||
commitFormat: angular
|
commitFormat: angular
|
||||||
branch:
|
branch:
|
||||||
master: release
|
master: release
|
||||||
develop: beta
|
beta: beta
|
||||||
assets:
|
assets:
|
||||||
- path: ./build/go-semantic-release.linux_amd64
|
- name: ./build/go-semantic-release.linux_x86_64
|
||||||
compress: true
|
compress: true
|
||||||
- path: ./build/go-semantic-release.linux_arm64
|
- name: ./build/go-semantic-release.windows_i386.exe
|
||||||
compress: true
|
compress: true
|
||||||
- path: ./build/go-semantic-release.windows_i386.exe
|
- name: ./build/go-semantic-release.windows_x86_64.exe
|
||||||
compress: true
|
compress: true
|
||||||
- path: ./build/go-semantic-release.windows_amd64.exe
|
- name: ./build/go-semantic-release.darwin_x86_64
|
||||||
compress: true
|
|
||||||
- path: ./build/go-semantic-release.darwin_amd64
|
|
||||||
compress: true
|
compress: true
|
||||||
changelog:
|
changelog:
|
||||||
docker:
|
docker:
|
||||||
latest: true
|
latest: true
|
||||||
repository: "cybercinch/go-semantic-release"
|
repository: "nightapes/go-semantic-release"
|
||||||
showAuthors: true
|
showAuthors: true
|
||||||
|
|
||||||
hooks:
|
hooks:
|
||||||
preRelease: []
|
preRelease:
|
||||||
postRelease: []
|
- docker build -t nightapes/go-semantic-release:latest .
|
||||||
|
- docker tag nightapes/go-semantic-release:latest docker.pkg.github.com/nightapes/go-semantic-release/go-semantic-release:$RELEASE_VERSION
|
||||||
|
- docker tag nightapes/go-semantic-release:latest nightapes/go-semantic-release:$RELEASE_VERSION
|
||||||
|
postRelease:
|
||||||
|
- docker push nightapes/go-semantic-release:latest
|
||||||
|
- docker push nightapes/go-semantic-release:$RELEASE_VERSION
|
||||||
|
- docker push docker.pkg.github.com/nightapes/go-semantic-release/go-semantic-release:$RELEASE_VERSION
|
||||||
|
|||||||
110
.woodpecker.yml
110
.woodpecker.yml
@@ -1,110 +0,0 @@
|
|||||||
variables:
|
|
||||||
- &platforms 'linux/arm64,linux/amd64'
|
|
||||||
- &docker_creds
|
|
||||||
username:
|
|
||||||
from_secret: hub_username_cybercinch
|
|
||||||
password:
|
|
||||||
from_secret: docker_password_cybercinch
|
|
||||||
- &pypi_creds
|
|
||||||
username:
|
|
||||||
from_secret: hub_username_cybercinch
|
|
||||||
password:
|
|
||||||
from_secret: docker_password_cybercinch
|
|
||||||
clone:
|
|
||||||
git:
|
|
||||||
image: woodpeckerci/plugin-git
|
|
||||||
settings:
|
|
||||||
partial: false
|
|
||||||
tags: true
|
|
||||||
|
|
||||||
steps:
|
|
||||||
build-release:
|
|
||||||
image: docker.io/cybercinch/go-semrelease:golang1.20
|
|
||||||
pull: true
|
|
||||||
commands:
|
|
||||||
- >
|
|
||||||
GOOS=linux
|
|
||||||
GOARCH=amd64
|
|
||||||
CGO_ENABLED=0
|
|
||||||
go build -o build/go-semantic-release.linux_amd64 -ldflags "-w -s --X main.version=`go-semantic-release next`"
|
|
||||||
./cmd/go-semantic-release/
|
|
||||||
- >
|
|
||||||
GOOS=linux
|
|
||||||
GOARCH=arm64
|
|
||||||
CGO_ENABLED=0
|
|
||||||
go build -o build/go-semantic-release.linux_arm64 -ldflags "-w -s --X main.version=`go-semantic-release next`"
|
|
||||||
./cmd/go-semantic-release/
|
|
||||||
- >
|
|
||||||
GOOS=windows
|
|
||||||
GOARCH=386
|
|
||||||
CGO_ENABLED=0
|
|
||||||
go build -o build/go-semantic-release.windows_i386.exe -ldflags "-w -s -X main.version=`go-semantic-release next`"
|
|
||||||
./cmd/go-semantic-release/
|
|
||||||
- >
|
|
||||||
GOOS=windows
|
|
||||||
GOARCH=amd64
|
|
||||||
CGO_ENABLED=0
|
|
||||||
go build -o build/go-semantic-release.windows_amd64.exe -ldflags "-w -s -X main.version=`go-semantic-release next`"
|
|
||||||
./cmd/go-semantic-release/
|
|
||||||
- >
|
|
||||||
GOOS=darwin
|
|
||||||
GOARCH=amd64
|
|
||||||
CGO_ENABLED=0
|
|
||||||
go build -o build/go-semantic-release.darwin_amd64 -ldflags "-w -s -X main.version=`go-semantic-release next`"
|
|
||||||
./cmd/go-semantic-release/
|
|
||||||
- go-semantic-release --loglevel debug release # Actually make the release on Gitea. Uploading assets
|
|
||||||
environment:
|
|
||||||
GITEA_TOKEN:
|
|
||||||
from_secret: gitea_token
|
|
||||||
GITEA_URL:
|
|
||||||
from_secret: gitea_server_url
|
|
||||||
when:
|
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
- manual
|
|
||||||
|
|
||||||
publish-docker-tagged:
|
|
||||||
image: docker.io/cybercinch/woodpecker-plugin-depot
|
|
||||||
pull: true
|
|
||||||
settings:
|
|
||||||
<<: *docker_creds
|
|
||||||
token:
|
|
||||||
from_secret: depot_token
|
|
||||||
repohost: hub.cybercinch.nz
|
|
||||||
repo: cybercinch/${CI_REPO_NAME}
|
|
||||||
project:
|
|
||||||
from_secret: depot_project
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
push: true
|
|
||||||
platforms: *platforms
|
|
||||||
buildargs:
|
|
||||||
- TAG=${CI_COMMIT_TAG}
|
|
||||||
tags:
|
|
||||||
- "latest"
|
|
||||||
- ${CI_COMMIT_TAG}
|
|
||||||
when:
|
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
publish-docker-develop:
|
|
||||||
image: docker.io/cybercinch/woodpecker-plugin-depot
|
|
||||||
pull: true
|
|
||||||
settings:
|
|
||||||
<<: *docker_creds
|
|
||||||
token:
|
|
||||||
from_secret: depot_token
|
|
||||||
repohost: hub.cybercinch.nz
|
|
||||||
repo: cybercinch/${CI_REPO_NAME}
|
|
||||||
project:
|
|
||||||
from_secret: depot_project
|
|
||||||
dockerfile: Dockerfile.dev
|
|
||||||
push: true
|
|
||||||
platforms: linux/amd64
|
|
||||||
tags: ["develop"]
|
|
||||||
when:
|
|
||||||
branch: develop
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
- manual
|
|
||||||
@@ -1,13 +1,8 @@
|
|||||||
FROM alpine:3.14
|
FROM alpine:3.14
|
||||||
ARG TARGETPLATFORM
|
|
||||||
ARG TAG=v2.2.3
|
|
||||||
|
|
||||||
WORKDIR /code
|
WORKDIR /code
|
||||||
|
|
||||||
ADD https://hub.cybercinch.nz/cybercinch/go-semantic-release/releases/download/${TAG}/go-semantic-release.linux_${TARGETPLATFORM//"linux/"/}.zip /tmp
|
COPY ./build/go-semantic-release.linux_x86_64 /usr/local/bin/go-semantic-release
|
||||||
RUN unzip /tmp/go-semantic-release.linux_${TARGETPLATFORM//"linux/"/}.zip && \
|
|
||||||
mv /tmp/go-semantic-release.linux_${TARGETPLATFORM//"linux/"/} /usr/local/bin/go-semantic-release && \
|
|
||||||
rm -f /tmp/go-semantic-release.linux_${TARGETPLATFORM//"linux/"/}.zip
|
|
||||||
|
|
||||||
USER 1000
|
USER 1000
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
FROM golang:1.20 as build
|
|
||||||
|
|
||||||
WORKDIR /code
|
|
||||||
|
|
||||||
# Copy code into build container
|
|
||||||
COPY . /code/
|
|
||||||
|
|
||||||
RUN GOOS=linux \
|
|
||||||
GOARCH=amd64 \
|
|
||||||
CGO_ENABLED=0 \
|
|
||||||
go build -o build/go-semantic-release.linux_x86_64 -ldflags "-w -s --X main.version=`go-semantic-release next`" \
|
|
||||||
./cmd/go-semantic-release/
|
|
||||||
|
|
||||||
|
|
||||||
FROM alpine:3.14
|
|
||||||
|
|
||||||
WORKDIR /code
|
|
||||||
|
|
||||||
COPY --from=build /code/build/go-semantic-release.linux_x86_64 /usr/local/bin/go-semantic-release
|
|
||||||
|
|
||||||
USER 1000
|
|
||||||
|
|
||||||
ENTRYPOINT [ "go-semantic-release" ]
|
|
||||||
17
README.md
17
README.md
@@ -10,7 +10,6 @@
|
|||||||
| `gitlab` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | :white_check_mark: |
|
| `gitlab` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | :white_check_mark: |
|
||||||
| `git` | :white_check_mark: | :white_check_mark: | | | :white_check_mark: | |
|
| `git` | :white_check_mark: | :white_check_mark: | | | :white_check_mark: | |
|
||||||
| `bitbucket` | Comming soon | :white_check_mark: | | | :white_check_mark: | |
|
| `bitbucket` | Comming soon | :white_check_mark: | | | :white_check_mark: | |
|
||||||
| `gitea` | Coming soon | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
|
||||||
|
|
||||||
|
|
||||||
## Supported CI Pipelines
|
## Supported CI Pipelines
|
||||||
@@ -98,7 +97,7 @@ branch:
|
|||||||
|
|
||||||
#### Release
|
#### Release
|
||||||
|
|
||||||
At the moment we support releases to gitlab, github and gitea.
|
At the moment we support releases to gitlab and github.
|
||||||
|
|
||||||
##### Github
|
##### Github
|
||||||
|
|
||||||
@@ -145,20 +144,6 @@ git:
|
|||||||
## Optional, if you want to change the default tag prefix ("v")
|
## Optional, if you want to change the default tag prefix ("v")
|
||||||
tagPrefix: ""
|
tagPrefix: ""
|
||||||
```
|
```
|
||||||
##### Gitea
|
|
||||||
|
|
||||||
You need to set the env `GITEA_TOKEN` with an access token.
|
|
||||||
|
|
||||||
```yml
|
|
||||||
release: 'gitea'
|
|
||||||
gitea:
|
|
||||||
user: "<user/group"
|
|
||||||
repo: "<repositoryname>"
|
|
||||||
## URL of your Gitea instance
|
|
||||||
Url: <https://your.github>
|
|
||||||
## Optional, if you want to change the default tag prefix ("v")
|
|
||||||
tagPrefix: ""
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
#### Assets
|
#### Assets
|
||||||
|
|||||||
15
go.mod
15
go.mod
@@ -17,17 +17,10 @@ require (
|
|||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/davidmz/go-pageant v1.0.2 // indirect
|
|
||||||
github.com/go-fed/httpsig v1.1.0 // indirect
|
|
||||||
github.com/hashicorp/go-version v1.6.0 // indirect
|
|
||||||
)
|
|
||||||
|
|
||||||
require (
|
|
||||||
code.gitea.io/sdk/gitea v0.17.1
|
|
||||||
github.com/Microsoft/go-winio v0.6.0 // indirect
|
github.com/Microsoft/go-winio v0.6.0 // indirect
|
||||||
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect
|
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect
|
||||||
github.com/acomagu/bufpipe v1.0.3 // indirect
|
github.com/acomagu/bufpipe v1.0.3 // indirect
|
||||||
github.com/cloudflare/circl v1.3.2 // indirect
|
github.com/cloudflare/circl v1.3.3 // indirect
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
github.com/emirpasic/gods v1.18.1 // indirect
|
github.com/emirpasic/gods v1.18.1 // indirect
|
||||||
github.com/go-git/gcfg v1.5.0 // indirect
|
github.com/go-git/gcfg v1.5.0 // indirect
|
||||||
@@ -46,10 +39,10 @@ require (
|
|||||||
github.com/tidwall/match v1.1.1 // indirect
|
github.com/tidwall/match v1.1.1 // indirect
|
||||||
github.com/tidwall/pretty v1.2.1 // indirect
|
github.com/tidwall/pretty v1.2.1 // indirect
|
||||||
github.com/xanzy/ssh-agent v0.3.3 // indirect
|
github.com/xanzy/ssh-agent v0.3.3 // indirect
|
||||||
golang.org/x/crypto v0.17.0 // indirect
|
golang.org/x/crypto v0.6.0 // indirect
|
||||||
golang.org/x/mod v0.8.0 // indirect
|
golang.org/x/mod v0.8.0 // indirect
|
||||||
golang.org/x/net v0.10.0 // indirect
|
golang.org/x/net v0.7.0 // indirect
|
||||||
golang.org/x/sys v0.15.0 // indirect
|
golang.org/x/sys v0.5.0 // indirect
|
||||||
golang.org/x/tools v0.6.0 // indirect
|
golang.org/x/tools v0.6.0 // indirect
|
||||||
google.golang.org/appengine v1.6.7 // indirect
|
google.golang.org/appengine v1.6.7 // indirect
|
||||||
google.golang.org/protobuf v1.28.1 // indirect
|
google.golang.org/protobuf v1.28.1 // indirect
|
||||||
|
|||||||
40
go.sum
40
go.sum
@@ -1,5 +1,3 @@
|
|||||||
code.gitea.io/sdk/gitea v0.17.1 h1:3jCPOG2ojbl8AcfaUCRYLT5MUcBMFwS0OSK2mA5Zok8=
|
|
||||||
code.gitea.io/sdk/gitea v0.17.1/go.mod h1:aCnBqhHpoEWA180gMbaCtdX9Pl6BWBAuuP2miadoTNM=
|
|
||||||
github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww=
|
github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww=
|
||||||
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
|
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
|
||||||
github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=
|
github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=
|
||||||
@@ -16,21 +14,17 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd
|
|||||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
|
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
|
||||||
github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
|
github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
|
||||||
github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I=
|
github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I=
|
||||||
github.com/cloudflare/circl v1.3.2 h1:VWp8dY3yH69fdM7lM6A1+NhhVoDu9vqK0jOgmkQHFWk=
|
github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs=
|
||||||
github.com/cloudflare/circl v1.3.2/go.mod h1:+CauBF6R70Jqcyl8N2hC8pAXYbWkGIezuSbuGLtRhnw=
|
github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davidmz/go-pageant v1.0.2 h1:bPblRCh5jGU+Uptpz6LgMZGD5hJoOt7otgT454WvHn0=
|
|
||||||
github.com/davidmz/go-pageant v1.0.2/go.mod h1:P2EDDnMqIwG5Rrp05dTRITj9z2zpGcD9efWSkTNKLIE=
|
|
||||||
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
|
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
|
||||||
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
|
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
|
||||||
github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY=
|
github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY=
|
||||||
github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4=
|
github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4=
|
||||||
github.com/go-fed/httpsig v1.1.0 h1:9M+hb0jkEICD8/cAiNqEB66R87tTINszBRTjwjQzWcI=
|
|
||||||
github.com/go-fed/httpsig v1.1.0/go.mod h1:RCMrTZvN1bJYtofsG4rd5NaO5obxQ5xBkdiS7xsT7bM=
|
|
||||||
github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4=
|
github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4=
|
||||||
github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E=
|
github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E=
|
||||||
github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
|
github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
|
||||||
@@ -55,8 +49,6 @@ github.com/google/go-github/v25 v25.1.3/go.mod h1:6z5pC69qHtrPJ0sXPsj4BLnd82b+r6
|
|||||||
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
|
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
|
||||||
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
|
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
|
||||||
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
|
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
|
||||||
github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek=
|
|
||||||
github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
|
||||||
github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk=
|
github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk=
|
||||||
github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg=
|
github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg=
|
||||||
github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
|
github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
|
||||||
@@ -115,20 +107,17 @@ github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM
|
|||||||
github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=
|
github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=
|
||||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
|
||||||
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
|
|
||||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||||
golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||||
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
|
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
|
||||||
golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
|
golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc=
|
||||||
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
|
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||||
golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
|
golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
|
||||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
|
||||||
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
@@ -136,9 +125,8 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx
|
|||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||||
golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
|
golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
|
||||||
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
|
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
|
||||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
|
||||||
golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
|
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||||
golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s=
|
golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s=
|
||||||
golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I=
|
golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I=
|
||||||
@@ -146,9 +134,7 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ
|
|||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
|
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
|
||||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
@@ -164,28 +150,20 @@ golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||||||
golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
|
||||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
|
|
||||||
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
|
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
|
||||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY=
|
||||||
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
|
|
||||||
golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4=
|
|
||||||
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
|
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||||
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
|
||||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
|
||||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
|
||||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ func GetCIProvider(gitUtil *gitutil.GitUtil, configCheck bool, envs map[string]s
|
|||||||
Travis{},
|
Travis{},
|
||||||
GithubActions{},
|
GithubActions{},
|
||||||
GitlabCI{},
|
GitlabCI{},
|
||||||
WoodpeckerCI{},
|
|
||||||
Git{gitUtil: gitUtil}, // Git must be the last option to check
|
Git{gitUtil: gitUtil}, // Git must be the last option to check
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,42 +0,0 @@
|
|||||||
package ci
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Travis struct
|
|
||||||
type WoodpeckerCI struct{}
|
|
||||||
|
|
||||||
// Detect if on travis
|
|
||||||
func (t WoodpeckerCI) detect(envs map[string]string) (*ProviderConfig, error) {
|
|
||||||
|
|
||||||
if envs["CI"] != "woodpecker" {
|
|
||||||
return nil, fmt.Errorf("not running on woodpecker")
|
|
||||||
}
|
|
||||||
|
|
||||||
isPR := false
|
|
||||||
|
|
||||||
value := envs["CI_COMMIT_PULL_REQUEST"]
|
|
||||||
pr := ""
|
|
||||||
|
|
||||||
if value == "" {
|
|
||||||
log.Debugf("CI_COMMIT_PULL_REQUEST=%s, not running on pr", value)
|
|
||||||
} else {
|
|
||||||
isPR = true
|
|
||||||
pr = value
|
|
||||||
}
|
|
||||||
|
|
||||||
return &ProviderConfig{
|
|
||||||
Service: "woodpecker",
|
|
||||||
Name: "Woodpecker CI",
|
|
||||||
Commit: envs["CI_COMMIT_SHA"],
|
|
||||||
Tag: envs["CI_COMMIT_TAG"],
|
|
||||||
BuildURL: envs["CI_PIPELINE_URL"],
|
|
||||||
Branch: envs["CI_COMMIT_BRANCH"],
|
|
||||||
IsPR: isPR,
|
|
||||||
PR: pr,
|
|
||||||
PRBranch: envs["CI_COMMIT_SOURCE_BRANCH"],
|
|
||||||
}, nil
|
|
||||||
}
|
|
||||||
@@ -1,161 +0,0 @@
|
|||||||
package gitea
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"fmt"
|
|
||||||
"net/http"
|
|
||||||
"os"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/Nightapes/go-semantic-release/internal/assets"
|
|
||||||
"github.com/Nightapes/go-semantic-release/internal/releaser/util"
|
|
||||||
"github.com/Nightapes/go-semantic-release/internal/shared"
|
|
||||||
"github.com/Nightapes/go-semantic-release/pkg/config"
|
|
||||||
|
|
||||||
"code.gitea.io/sdk/gitea"
|
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GITEA identifer for gitea interface
|
|
||||||
const GITEA = "gitea"
|
|
||||||
|
|
||||||
// Client type struct
|
|
||||||
type GiteaClient struct {
|
|
||||||
client *gitea.Client
|
|
||||||
config *config.GiteaProvider
|
|
||||||
context context.Context
|
|
||||||
release *gitea.Release
|
|
||||||
baseURL string
|
|
||||||
log *log.Entry
|
|
||||||
}
|
|
||||||
|
|
||||||
// New initialize a new GiteaRelease
|
|
||||||
func New(c *config.GiteaProvider, checkConfig bool) (*GiteaClient, error) {
|
|
||||||
|
|
||||||
token, err := util.GetAccessToken("GITEA_TOKEN")
|
|
||||||
if err != nil && checkConfig {
|
|
||||||
return &GiteaClient{}, err
|
|
||||||
}
|
|
||||||
|
|
||||||
c.AccessToken = token
|
|
||||||
|
|
||||||
if c.URL == "" {
|
|
||||||
url, err := util.GetAccessToken("GITEA_URL")
|
|
||||||
if err != nil && checkConfig {
|
|
||||||
return &GiteaClient{}, err
|
|
||||||
}
|
|
||||||
c.URL = url
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx := context.Background()
|
|
||||||
//httpClient := util.CreateBearerHTTPClient(ctx, c.AccessToken)
|
|
||||||
|
|
||||||
if c.Repo == "" && checkConfig {
|
|
||||||
return nil, fmt.Errorf("gitea repo is not set")
|
|
||||||
}
|
|
||||||
|
|
||||||
if c.User == "" && checkConfig {
|
|
||||||
return nil, fmt.Errorf("gitea user is not set")
|
|
||||||
}
|
|
||||||
|
|
||||||
if c.URL == "" && checkConfig {
|
|
||||||
return nil, fmt.Errorf("gitea url is not set")
|
|
||||||
}
|
|
||||||
|
|
||||||
client, err := gitea.NewClient(c.URL,
|
|
||||||
gitea.SetToken(c.AccessToken),
|
|
||||||
// gitea.SetHTTPClient(p.HTTPClient()),
|
|
||||||
gitea.SetContext(ctx))
|
|
||||||
if err != nil {
|
|
||||||
return &GiteaClient{}, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return &GiteaClient{
|
|
||||||
config: c,
|
|
||||||
client: client,
|
|
||||||
context: ctx,
|
|
||||||
baseURL: c.URL,
|
|
||||||
log: log.WithField("releaser", GITEA),
|
|
||||||
}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetCommitURL for gitea
|
|
||||||
func (g *GiteaClient) GetCommitURL() string {
|
|
||||||
return fmt.Sprintf("%s/%s/%s/commit/{{hash}}", g.baseURL, g.config.User, g.config.Repo)
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetCompareURL for gitea
|
|
||||||
func (g *GiteaClient) GetCompareURL(oldVersion, newVersion string) string {
|
|
||||||
return fmt.Sprintf("%s/%s/%s/compare/%s...%s", g.baseURL, g.config.User, g.config.Repo, oldVersion, newVersion)
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateRelease creates release on remote
|
|
||||||
func (g *GiteaClient) CreateRelease(releaseVersion *shared.ReleaseVersion, generatedChangelog *shared.GeneratedChangelog, assets *assets.Set) error {
|
|
||||||
err := g.makeRelease(releaseVersion, generatedChangelog)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return g.uploadAssets(assets)
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateRelease creates release on remote
|
|
||||||
func (g *GiteaClient) makeRelease(releaseVersion *shared.ReleaseVersion, generatedChangelog *shared.GeneratedChangelog) error {
|
|
||||||
|
|
||||||
tagPrefix := config.DefaultTagPrefix
|
|
||||||
if g.config.TagPrefix != nil {
|
|
||||||
tagPrefix = *g.config.TagPrefix
|
|
||||||
}
|
|
||||||
tag := tagPrefix + releaseVersion.Next.Version.String()
|
|
||||||
g.log.Debugf("create release with version %s", tag)
|
|
||||||
|
|
||||||
prerelease := releaseVersion.Next.Version.Prerelease() != ""
|
|
||||||
|
|
||||||
opt := gitea.CreateReleaseOption{TagName: tag,
|
|
||||||
Target: releaseVersion.Branch,
|
|
||||||
Title: generatedChangelog.Title,
|
|
||||||
Note: generatedChangelog.Content,
|
|
||||||
IsPrerelease: prerelease}
|
|
||||||
// TODO Test if this prevents release double-up
|
|
||||||
release, _, err := g.client.CreateRelease(g.config.User, g.config.Repo, opt)
|
|
||||||
|
|
||||||
g.log.Debugf("Release response: %+v", *release)
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
g.log.Debugf("Release Error response: %+v", err)
|
|
||||||
if strings.Contains(err.Error(), "Release is has no Tag") {
|
|
||||||
g.log.Infof("A release with tag %s already exits, will not perform a release or update", tag)
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return fmt.Errorf("could not create release: %s", err.Error())
|
|
||||||
}
|
|
||||||
g.release = release
|
|
||||||
g.log.Infof("Created release")
|
|
||||||
return nil
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// UploadAssets uploads specified assets
|
|
||||||
func (g *GiteaClient) uploadAssets(assets *assets.Set) error {
|
|
||||||
if g.release != nil {
|
|
||||||
for _, asset := range assets.All() {
|
|
||||||
path, err := asset.GetPath()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
file, err := os.Open(path)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
_, resp, err := g.client.CreateReleaseAttachment(g.config.User, g.config.Repo, g.release.ID, file, asset.GetName())
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if resp.StatusCode >= http.StatusBadRequest {
|
|
||||||
return fmt.Errorf("could not upload asset %s: %s", asset.GetName(), resp.Status)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
@@ -1,199 +0,0 @@
|
|||||||
package gitea
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"net/http"
|
|
||||||
"net/http/httptest"
|
|
||||||
"os"
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
|
|
||||||
"github.com/Masterminds/semver"
|
|
||||||
|
|
||||||
"github.com/Nightapes/go-semantic-release/internal/shared"
|
|
||||||
"github.com/Nightapes/go-semantic-release/pkg/config"
|
|
||||||
"github.com/stretchr/testify/assert"
|
|
||||||
)
|
|
||||||
|
|
||||||
type testHelperMethodStruct struct {
|
|
||||||
config config.GitHubProvider
|
|
||||||
valid bool
|
|
||||||
}
|
|
||||||
|
|
||||||
type testReleaseStruct struct {
|
|
||||||
config config.GitHubProvider
|
|
||||||
releaseVersion *shared.ReleaseVersion
|
|
||||||
generatedChangelog *shared.GeneratedChangelog
|
|
||||||
requestResponseBody string
|
|
||||||
requestResponseCode int
|
|
||||||
valid bool
|
|
||||||
}
|
|
||||||
|
|
||||||
var testNewClient = []testHelperMethodStruct{
|
|
||||||
{config: config.GitHubProvider{
|
|
||||||
Repo: "foo",
|
|
||||||
User: "bar",
|
|
||||||
},
|
|
||||||
valid: true,
|
|
||||||
},
|
|
||||||
|
|
||||||
{config: config.GitHubProvider{
|
|
||||||
Repo: "foo",
|
|
||||||
User: "bar",
|
|
||||||
CustomURL: "https://test.com",
|
|
||||||
},
|
|
||||||
valid: false,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
var lastVersion, _ = semver.NewVersion("1.0.0")
|
|
||||||
var newVersion, _ = semver.NewVersion("2.0.0")
|
|
||||||
|
|
||||||
var testReleases = []testReleaseStruct{
|
|
||||||
{
|
|
||||||
config: config.GitHubProvider{
|
|
||||||
Repo: "foo",
|
|
||||||
User: "bar",
|
|
||||||
},
|
|
||||||
releaseVersion: &shared.ReleaseVersion{
|
|
||||||
Last: shared.ReleaseVersionEntry{
|
|
||||||
Version: lastVersion,
|
|
||||||
Commit: "foo",
|
|
||||||
},
|
|
||||||
Next: shared.ReleaseVersionEntry{
|
|
||||||
Version: newVersion,
|
|
||||||
Commit: "bar",
|
|
||||||
},
|
|
||||||
Branch: "master",
|
|
||||||
},
|
|
||||||
generatedChangelog: &shared.GeneratedChangelog{
|
|
||||||
Title: "title",
|
|
||||||
Content: "content",
|
|
||||||
},
|
|
||||||
requestResponseBody: "{ \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1\", \"html_url\": \"https://github.com/octocat/Hello-World/releases/v1.0.0\", \"assets_url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\", \"upload_url\": \"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\", \"tarball_url\": \"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\", \"zipball_url\": \"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\", \"id\": 1, \"node_id\": \"MDc6UmVsZWFzZTE=\", \"tag_name\": \"v1.0.0\", \"target_commitish\": \"master\", \"name\": \"v1.0.0\", \"body\": \"Description of the release\", \"draft\": false, \"prerelease\": false, \"created_at\": \"2013-02-27T19:35:32Z\", \"published_at\": \"2013-02-27T19:35:32Z\", \"author\": { \"login\": \"octocat\", \"id\": 1, \"node_id\": \"MDQ6VXNlcjE=\", \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\", \"gravatar_id\": \"\", \"url\": \"https://api.github.com/users/octocat\", \"html_url\": \"https://github.com/octocat\", \"followers_url\": \"https://api.github.com/users/octocat/followers\", \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\", \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\", \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\", \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\", \"organizations_url\": \"https://api.github.com/users/octocat/orgs\", \"repos_url\": \"https://api.github.com/users/octocat/repos\", \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\", \"received_events_url\": \"https://api.github.com/users/octocat/received_events\", \"type\": \"User\", \"site_admin\": false }, \"assets\": [ ]}",
|
|
||||||
requestResponseCode: 200,
|
|
||||||
valid: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
config: config.GitHubProvider{
|
|
||||||
Repo: "foo",
|
|
||||||
User: "bar",
|
|
||||||
},
|
|
||||||
releaseVersion: &shared.ReleaseVersion{
|
|
||||||
Last: shared.ReleaseVersionEntry{
|
|
||||||
Version: lastVersion,
|
|
||||||
Commit: "foo",
|
|
||||||
},
|
|
||||||
Next: shared.ReleaseVersionEntry{
|
|
||||||
Version: newVersion,
|
|
||||||
Commit: "bar",
|
|
||||||
},
|
|
||||||
Branch: "master",
|
|
||||||
},
|
|
||||||
generatedChangelog: &shared.GeneratedChangelog{
|
|
||||||
Title: "title",
|
|
||||||
Content: "content",
|
|
||||||
},
|
|
||||||
requestResponseCode: 400,
|
|
||||||
valid: false,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
func initHTTPServer(respCode int, body string) *httptest.Server {
|
|
||||||
|
|
||||||
return httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
|
|
||||||
|
|
||||||
log.Infof("Got call from %s %s", req.Method, req.URL.String())
|
|
||||||
|
|
||||||
rw.WriteHeader(respCode)
|
|
||||||
rw.Header().Set("Content-Type", "application/json")
|
|
||||||
|
|
||||||
if _, err := rw.Write([]byte(body)); err != nil {
|
|
||||||
log.Info(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestNew(t *testing.T) {
|
|
||||||
for _, testOject := range testNewClient {
|
|
||||||
if testOject.valid {
|
|
||||||
os.Setenv("GITHUB_TOKEN", "XXX")
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err := New(&testOject.config, true)
|
|
||||||
assert.Equal(t, testOject.valid, err == nil)
|
|
||||||
|
|
||||||
os.Unsetenv("GITHUB_TOKEN")
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestGetCommitURL(t *testing.T) {
|
|
||||||
os.Setenv("GITHUB_TOKEN", "XX")
|
|
||||||
for _, testOject := range testNewClient {
|
|
||||||
client, _ := New(&testOject.config, false)
|
|
||||||
actualURL := client.GetCommitURL()
|
|
||||||
if testOject.config.CustomURL != "" {
|
|
||||||
expectedURL := fmt.Sprintf("%s/api/v3/%s/%s/commit/{{hash}}", testOject.config.CustomURL, testOject.config.User, testOject.config.Repo)
|
|
||||||
assert.EqualValues(t, expectedURL, actualURL)
|
|
||||||
|
|
||||||
} else {
|
|
||||||
expectedURL := fmt.Sprintf("%s/%s/%s/commit/{{hash}}", "https://github.com", testOject.config.User, testOject.config.Repo)
|
|
||||||
assert.EqualValues(t, expectedURL, actualURL)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
os.Unsetenv("GITHUB_TOKEN")
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestGetCompareURL(t *testing.T) {
|
|
||||||
os.Setenv("GITHUB_TOKEN", "XX")
|
|
||||||
for _, testOject := range testNewClient {
|
|
||||||
client, _ := New(&testOject.config, false)
|
|
||||||
actualURL := client.GetCompareURL("1", "2")
|
|
||||||
if testOject.config.CustomURL != "" {
|
|
||||||
expectedURL := fmt.Sprintf("%s/api/v3/%s/%s/compare/%s...%s", testOject.config.CustomURL, testOject.config.User, testOject.config.Repo, "1", "2")
|
|
||||||
assert.EqualValues(t, expectedURL, actualURL)
|
|
||||||
|
|
||||||
} else {
|
|
||||||
expectedURL := fmt.Sprintf("%s/%s/%s/compare/%s...%s", "https://github.com", testOject.config.User, testOject.config.Repo, "1", "2")
|
|
||||||
assert.EqualValues(t, expectedURL, actualURL)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
os.Unsetenv("GITHUB_TOKEN")
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestCreateRelease(t *testing.T) {
|
|
||||||
os.Setenv("GITHUB_TOKEN", "XX")
|
|
||||||
|
|
||||||
for _, testObejct := range testReleases {
|
|
||||||
if testObejct.valid {
|
|
||||||
server := initHTTPServer(testObejct.requestResponseCode, testObejct.requestResponseBody)
|
|
||||||
testObejct.config.CustomURL = server.URL
|
|
||||||
client, _ := New(&testObejct.config, false)
|
|
||||||
|
|
||||||
err := client.makeRelease(testObejct.releaseVersion, testObejct.generatedChangelog)
|
|
||||||
if err != nil {
|
|
||||||
t.Log(err)
|
|
||||||
}
|
|
||||||
assert.Equal(t, testObejct.valid, err == nil)
|
|
||||||
|
|
||||||
server.Close()
|
|
||||||
|
|
||||||
} else {
|
|
||||||
testObejct.config.CustomURL = "http://foo"
|
|
||||||
client, _ := New(&testObejct.config, false)
|
|
||||||
|
|
||||||
err := client.makeRelease(testObejct.releaseVersion, testObejct.generatedChangelog)
|
|
||||||
if err != nil {
|
|
||||||
t.Log(err)
|
|
||||||
}
|
|
||||||
assert.Error(t, err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
os.Unsetenv("GITHUB_TOKEN")
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -6,7 +6,6 @@ import (
|
|||||||
"github.com/Nightapes/go-semantic-release/internal/assets"
|
"github.com/Nightapes/go-semantic-release/internal/assets"
|
||||||
"github.com/Nightapes/go-semantic-release/internal/gitutil"
|
"github.com/Nightapes/go-semantic-release/internal/gitutil"
|
||||||
"github.com/Nightapes/go-semantic-release/internal/releaser/git"
|
"github.com/Nightapes/go-semantic-release/internal/releaser/git"
|
||||||
"github.com/Nightapes/go-semantic-release/internal/releaser/gitea"
|
|
||||||
"github.com/Nightapes/go-semantic-release/internal/releaser/github"
|
"github.com/Nightapes/go-semantic-release/internal/releaser/github"
|
||||||
"github.com/Nightapes/go-semantic-release/internal/releaser/gitlab"
|
"github.com/Nightapes/go-semantic-release/internal/releaser/gitlab"
|
||||||
"github.com/Nightapes/go-semantic-release/internal/shared"
|
"github.com/Nightapes/go-semantic-release/internal/shared"
|
||||||
@@ -45,9 +44,6 @@ func (r *Releasers) GetReleaser(checkConfig bool) (Releaser, error) {
|
|||||||
case gitlab.GITLAB:
|
case gitlab.GITLAB:
|
||||||
log.Debugf("initialize new %s-provider", gitlab.GITLAB)
|
log.Debugf("initialize new %s-provider", gitlab.GITLAB)
|
||||||
return gitlab.New(&r.config.GitLabProvider, checkConfig)
|
return gitlab.New(&r.config.GitLabProvider, checkConfig)
|
||||||
case gitea.GITEA:
|
|
||||||
log.Debugf("initialize new %s-provider", gitea.GITEA)
|
|
||||||
return gitea.New(&r.config.GiteaProvider, checkConfig)
|
|
||||||
case git.GITONLY:
|
case git.GITONLY:
|
||||||
log.Debugf("initialize new %s-provider", git.GITONLY)
|
log.Debugf("initialize new %s-provider", git.GITONLY)
|
||||||
return git.New(&r.config.GitProvider, r.git, checkConfig)
|
return git.New(&r.config.GitProvider, r.git, checkConfig)
|
||||||
|
|||||||
@@ -58,15 +58,6 @@ type GitHubProvider struct {
|
|||||||
TagPrefix *string `yaml:"tagPrefix,omitempty"`
|
TagPrefix *string `yaml:"tagPrefix,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GiteaProvider struct
|
|
||||||
type GiteaProvider struct {
|
|
||||||
Repo string `yaml:"repo"`
|
|
||||||
User string `yaml:"user"`
|
|
||||||
URL string `yaml:"url,omitempty"`
|
|
||||||
AccessToken string
|
|
||||||
TagPrefix *string `yaml:"tagPrefix,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// GitLabProvider struct
|
// GitLabProvider struct
|
||||||
type GitLabProvider struct {
|
type GitLabProvider struct {
|
||||||
Repo string `yaml:"repo"`
|
Repo string `yaml:"repo"`
|
||||||
@@ -113,7 +104,6 @@ type ReleaseConfig struct {
|
|||||||
Analyzer AnalyzerConfig `yaml:"analyzer"`
|
Analyzer AnalyzerConfig `yaml:"analyzer"`
|
||||||
Changelog ChangelogConfig `yaml:"changelog,omitempty"`
|
Changelog ChangelogConfig `yaml:"changelog,omitempty"`
|
||||||
Release string `yaml:"release,omitempty"`
|
Release string `yaml:"release,omitempty"`
|
||||||
GiteaProvider GiteaProvider `yaml:"gitea,omitempty"`
|
|
||||||
GitHubProvider GitHubProvider `yaml:"github,omitempty"`
|
GitHubProvider GitHubProvider `yaml:"github,omitempty"`
|
||||||
GitLabProvider GitLabProvider `yaml:"gitlab,omitempty"`
|
GitLabProvider GitLabProvider `yaml:"gitlab,omitempty"`
|
||||||
GitProvider GitProvider `yaml:"git,omitempty"`
|
GitProvider GitProvider `yaml:"git,omitempty"`
|
||||||
|
|||||||
@@ -1,85 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
commit_message_check (){
|
|
||||||
# Get the current branch and apply it to a variable
|
|
||||||
currentbranch=`git branch | grep \* | cut -d ' ' -f2`
|
|
||||||
|
|
||||||
# Gets the commits for the current branch and outputs to file
|
|
||||||
git log $currentbranch --pretty=format:"%H" --not master > shafile.txt
|
|
||||||
|
|
||||||
# loops through the file an gets the message
|
|
||||||
for i in `cat ./shafile.txt`;
|
|
||||||
do
|
|
||||||
# gets the git commit message based on the sha
|
|
||||||
gitmessage=`git log --format=%B -n 1 "$i"`
|
|
||||||
|
|
||||||
####################### TEST STRINGS comment out line 13 to use #########################################
|
|
||||||
#gitmessage="feat sdasdsadsaas (AEROGEAR-asdsada)"
|
|
||||||
#gitmessage="feat(some txt): some txt (AEROGEAR-****)"
|
|
||||||
#gitmessage="docs(some txt): some txt (AEROGEAR-1234)"
|
|
||||||
#gitmessage="fix(some txt): some txt (AEROGEAR-5678)"
|
|
||||||
#########################################################################################################
|
|
||||||
|
|
||||||
# Checks gitmessage for string feat, fix, docs and breaking, if the messagecheck var is empty if fails
|
|
||||||
messagecheck=`echo $gitmessage | grep -w "chore\|feat\|fix\|docs\|breaking"`
|
|
||||||
if [ -z "$messagecheck" ]
|
|
||||||
then
|
|
||||||
echo "Your commit message must begin with one of the following"
|
|
||||||
echo " feat(feature-name)"
|
|
||||||
echo " fix(fix-name)"
|
|
||||||
echo " docs(docs-change)"
|
|
||||||
echo " "
|
|
||||||
fi
|
|
||||||
if [ ${PerformProjectCheck} == "true" ]; then
|
|
||||||
#check the gitmessage for the Jira number
|
|
||||||
messagecheck=`echo $gitmessage | grep "(${ProjectID}-"`
|
|
||||||
if [ -z "$messagecheck" ]
|
|
||||||
then
|
|
||||||
echo "Your commit message must end with the following"
|
|
||||||
echo " (${ProjectID}-****)"
|
|
||||||
echo "Where **** is the Jira number"
|
|
||||||
echo " "
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
messagecheck=`echo $gitmessage | grep ": "`
|
|
||||||
if [ -z "$messagecheck" ]
|
|
||||||
then
|
|
||||||
echo "Your commit message has a formatting error please take note of special characters '():' position and use in the example below"
|
|
||||||
echo " type(some txt): some txt (${ProjectID}-****)"
|
|
||||||
echo "Where 'type' is fix, feat, docs or breaking and **** is the Jira number"
|
|
||||||
echo " "
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ${PerformProjectCheck} == "true" ]; then
|
|
||||||
# All checks run at the same time by pipeing from one grep to another
|
|
||||||
messagecheck=`echo $gitmessage | grep -w "chore\|feat\|fix\|docs\|breaking" | grep "(${ProjectID}-" | grep ": "`
|
|
||||||
else
|
|
||||||
# All checks run at the same time by pipeing from one grep to another
|
|
||||||
messagecheck=`echo $gitmessage | grep -w "chore\|feat\|fix\|docs\|breaking" | grep ": "`
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# check to see if the messagecheck var is empty
|
|
||||||
if [ -z "$messagecheck" ]
|
|
||||||
then
|
|
||||||
echo "The commit message with sha: '$i' failed "
|
|
||||||
echo "Please review the following :"
|
|
||||||
echo " "
|
|
||||||
echo $gitmessage
|
|
||||||
echo " "
|
|
||||||
rm shafile.txt >/dev/null 2>&1
|
|
||||||
set -o errexit
|
|
||||||
else
|
|
||||||
echo "$messagecheck"
|
|
||||||
echo "'$i' commit message passed"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
rm shafile.txt >/dev/null 2>&1
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ProjectID="NA" # Set to your Jira Project ID if want to track references to tickets.
|
|
||||||
PerformProjectCheck="false" # Set true if ProjectID is set and you want to ensure Jira ref is included on commit.
|
|
||||||
# Calling the function
|
|
||||||
commit_message_check
|
|
||||||
Reference in New Issue
Block a user