29 lines
896 B
Bash
Executable File
29 lines
896 B
Bash
Executable File
#!/bin/bash
|
|
# Conventional ChangeLog Wrapper Script: clog
|
|
|
|
function githubRelease {
|
|
curl -L \
|
|
-X POST \
|
|
-H "Accept: application/vnd.github+json" \
|
|
-H "Authorization: Bearer <YOUR-TOKEN>" \
|
|
-H "X-GitHub-Api-Version: 2022-11-28" \
|
|
https://api.github.com/repos/OWNER/REPO/releases \
|
|
-d '{"tag_name":"v1.0.0","target_commitish":"master","name":"v1.0.0","body":"Description of the release","draft":false,"prerelease":false,"generate_release_notes":false}'
|
|
}
|
|
function release {
|
|
local tag=$1
|
|
local name=$2
|
|
local body=$3
|
|
local branch=$4
|
|
curl -L \
|
|
-X POST \
|
|
-H "Accept: application/json" \
|
|
-H "Authorization: Bearer $GIT_TOKEN" \
|
|
$SERVER/repos/$OWNER/$REPO/releases \
|
|
-d '{"tag_name":"'$tag'","target_commitish":"'$branch'","name":"'$name'","body":"'$body'","draft":false,"prerelease":false,"generate_release_notes":false}'
|
|
}
|
|
|
|
|
|
. ./sheep; sheep $@
|
|
|