File: 90-create-gh-release.sh

package info (click to toggle)
mongrel2 1.12.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,976 kB
  • sloc: ansic: 39,083; python: 2,833; sql: 1,555; sh: 467; makefile: 360; asm: 189; yacc: 145; php: 73; awk: 28; sed: 5
file content (25 lines) | stat: -rw-r--r-- 705 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#/bin/sh
RELEASE_INFO="$(cat <<EOF
{
    "tag_name" : "$RELEASE_NAME",
    "draft" : true
}
EOF
)"

if test -z ${REALLY_RELEASE+x}; then
    cp dummy-release.json output/release.json
    cat <<EOF
If REALLY_RELEASE were set then I would run the following:
    git push origin "$RELEASE_NAME"
    git push origin develop
    curl -u "$(cat $AUTH_FILE)" --data "$RELEASE_INFO" \
         "https://api.github.com/repos/$OWNER/$REPO/releases" > output/release.json
EOF
else
    git push origin "$RELEASE_NAME"
    git push origin develop
    git push origin master
    curl -u "$(cat $AUTH_FILE)" --data "$RELEASE_INFO" \
         "https://api.github.com/repos/$OWNER/$REPO/releases" > output/release.json
fi