-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathappveyor.inc.sh
124 lines (112 loc) · 3.79 KB
/
appveyor.inc.sh
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#!/usr/bin/env bash
# shellcheck disable=SC2034
set -euo pipefail
# see https://www.appveyor.com/docs/environment-variables/
function yp_ci_env_appveyor() {
false || \
[[ "${APPVEYOR:-}" = "True" ]] || \
[[ "${APPVEYOR:-}" = "true" ]] || \
return 0
if printenv | grep -q "=True$"; then
# normalize 'True' to 'true'
while read -r NO_XARGS_R; do
[[ -n "${NO_XARGS_R}" ]] || continue;
eval "export ${NO_XARGS_R}=true"
done < <(printenv | grep "=True$" | sed "s/=.*//g" | grep "^[a-zA-Z_][a-zA-Z0-9_]*$")
fi
[[ "${APPVEYOR_REPO_PROVIDER:-}" = "gitHub" ]]
export CI=true
YP_CI_NAME=Appveyor
YP_CI_PLATFORM=appveyor
YP_CI_SERVER_HOST=${APPVEYOR_URL:-ci.appveyor.com}
YP_CI_SERVER_HOST=${YP_CI_SERVER_HOST#*://}
YP_CI_REPO_SLUG=${APPVEYOR_REPO_NAME:-}
YP_CI_ROOT=${APPVEYOR_BUILD_FOLDER}
YP_CI_IS_CRON=${APPVEYOR_SCHEDULED_BUILD:-}
YP_CI_IS_PR=
[[ -z "${APPVEYOR_PULL_REQUEST_NUMBER:-}" ]] || YP_CI_IS_PR=true
YP_CI_JOB_ID=${APPVEYOR_JOB_ID:-}
YP_CI_PIPELINE_ID=${APPVEYOR_BUILD_NUMBER:-}
# YP_CI_JOB_URL=https://${YP_CI_SERVER_HOST}/project/${APPVEYOR_ACCOUNT_NAME:-}/${APPVEYOR_PROJECT_SLUG:-}/builds/${YP_CI_JOB_ID} # editorconfig-checker-disable-line
YP_CI_JOB_URL=https://${YP_CI_SERVER_HOST}/project/${APPVEYOR_ACCOUNT_NAME:-}/${APPVEYOR_PROJECT_SLUG:-}/build/job/${YP_CI_JOB_ID} # editorconfig-checker-disable-line
YP_CI_PIPELINE_URL=https://${YP_CI_SERVER_HOST}/project/${APPVEYOR_ACCOUNT_NAME:-}/${APPVEYOR_PROJECT_SLUG:-}/build/${YP_CI_PIPELINE_ID} # editorconfig-checker-disable-line
YP_CI_PR_NUMBER=
YP_CI_PR_URL=
YP_CI_PR_REPO_SLUG=
YP_CI_PR_GIT_HASH=
YP_CI_PR_GIT_BRANCH=
[[ "${YP_CI_IS_PR}" != "true" ]] || {
YP_CI_PR_NUMBER=${APPVEYOR_PULL_REQUEST_NUMBER:-}
YP_CI_PR_URL=https://github.com/${YP_CI_REPO_SLUG}/pull/${YP_CI_PR_NUMBER}
YP_CI_PR_REPO_SLUG=${APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME:-}
YP_CI_PR_GIT_HASH=${APPVEYOR_PULL_REQUEST_HEAD_COMMIT:-}
YP_CI_PR_GIT_BRANCH=${APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH:-}
}
YP_CI_GIT_HASH=${APPVEYOR_REPO_COMMIT:-}
YP_CI_GIT_BRANCH=${APPVEYOR_REPO_BRANCH:-}
YP_CI_GIT_TAG=${APPVEYOR_REPO_TAG_NAME:-}
YP_CI_DEBUG_MODE=${YP_CI_DEBUG_MODE:-}
}
function yp_ci_printvars_appveyor() {
printenv_all | sort -u | grep \
-e "^APPVEYOR[=_]" \
-e "^CI[=_]" \
-e "^CONFIGURATION$" \
-e "^PLATFORM$"
}
function yp_ci_known_env_appveyor() {
cat <<EOF
CI
APPVEYOR
APPVEYOR_URL
APPVEYOR_API_URL
APPVEYOR_ACCOUNT_NAME
APPVEYOR_PROJECT_ID
APPVEYOR_PROJECT_NAME
APPVEYOR_PROJECT_SLUG
APPVEYOR_BUILD_FOLDER
APPVEYOR_BUILD_ID
APPVEYOR_BUILD_NUMBER
APPVEYOR_BUILD_VERSION
APPVEYOR_BUILD_WORKER_IMAGE
APPVEYOR_PULL_REQUEST_NUMBER
APPVEYOR_PULL_REQUEST_TITLE
APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME
APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH
APPVEYOR_PULL_REQUEST_HEAD_COMMIT
APPVEYOR_JOB_ID
APPVEYOR_JOB_NAME
APPVEYOR_JOB_NUMBER
APPVEYOR_REPO_PROVIDER
APPVEYOR_REPO_SCM
APPVEYOR_REPO_NAME
APPVEYOR_REPO_BRANCH
APPVEYOR_REPO_TAG
APPVEYOR_REPO_TAG_NAME
APPVEYOR_REPO_COMMIT
APPVEYOR_REPO_COMMIT_AUTHOR
APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL
APPVEYOR_REPO_COMMIT_TIMESTAMP
APPVEYOR_REPO_COMMIT_MESSAGE
APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED
APPVEYOR_SCHEDULED_BUILD
APPVEYOR_FORCED_BUILD
APPVEYOR_RE_BUILD
APPVEYOR_RE_RUN_INCOMPLETE
PLATFORM
CONFIGURATION
APPVEYOR_ARTIFACT_UPLOAD_TIMEOUT
APPVEYOR_FILE_DOWNLOAD_TIMEOUT
APPVEYOR_REPOSITORY_SHALLOW_CLONE_TIMEOUT
APPVEYOR_CACHE_ENTRY_UPLOAD_DOWNLOAD_TIMEOUT
APPVEYOR_CACHE_SKIP_RESTORE
APPVEYOR_CACHE_SKIP_SAVE
APPVEYOR_WAP_ARTIFACT_NAME
APPVEYOR_WAP_SKIP_ACLS
APPVEYOR_BUILD_WORKER_IMAGE
APPVEYOR_SKIP_FINALIZE_ON_EXIT
APPVEYOR_SAVE_CACHE_ON_ERROR
APPVEYOR_ACS_DEPLOYMENT_UPGRADE_MODE
APPVEYOR_IGNORE_COMMIT_FILTERING_ON_TAG
EOF
}