1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-19 02:46:33 -05:00

Merge branch 'master' into v5

This commit is contained in:
loyalsoldier 2020-11-25 11:35:42 +08:00
commit 78aaa9ff5f
No known key found for this signature in database
GPG Key ID: 23829BBC1ACF2C90
3 changed files with 8 additions and 8 deletions

View File

@ -33,13 +33,13 @@ steps:
displayName: "Generate Bleeding Edge Release" displayName: "Generate Bleeding Edge Release"
env: env:
WORKDIR: $(system.defaultWorkingDirectory) WORKDIR: $(system.defaultWorkingDirectory)
GITHUB_TOKEN: $(GITHUB_TOKEN) PERSONAL_TOKEN: $(GITHUB_TOKEN)
PRERELEASE: true PRERELEASE: true
RELEASE_TAG: unstable-$(Build.SourceVersion) RELEASE_TAG: unstable-$(Build.SourceVersion)
RELEASE_SHA: $(Build.SourceVersion) RELEASE_SHA: $(Build.SourceVersion)
TRIGGER_REASON: $(Build.SourceBranch) TRIGGER_REASON: $(Build.SourceBranch)
GITHUB_REPO_OWNER: v2fly COMMENT_TARGETTED_REPO_OWNER: v2fly
GITHUB_REPO_NAME: v2ray-core COMMENT_TARGETTED_REPO_NAME: v2ray-core
- script: | - script: |
echo $RELEASE_TAG echo $RELEASE_TAG
./release/tagrelease.sh ./release/tagrelease.sh
@ -47,7 +47,7 @@ steps:
displayName: "Generate Tag Release" displayName: "Generate Tag Release"
env: env:
WORKDIR: $(system.defaultWorkingDirectory) WORKDIR: $(system.defaultWorkingDirectory)
GITHUB_TOKEN: $(GITHUB_TOKEN) PERSONAL_TOKEN: $(GITHUB_TOKEN)
PRERELEASE: true PRERELEASE: true
RELEASE_TAG: unstable-$(Build.SourceVersion) RELEASE_TAG: unstable-$(Build.SourceVersion)
RELEASE_SHA: $(Build.SourceVersion) RELEASE_SHA: $(Build.SourceVersion)

View File

@ -4,7 +4,7 @@ RELBODY="https://github.com/v2fly/v2ray-core/commit/${RELEASE_SHA}"
JSON_DATA=$(echo "{}" | jq -c ".tag_name=\"${RELEASE_TAG}\"") JSON_DATA=$(echo "{}" | jq -c ".tag_name=\"${RELEASE_TAG}\"")
JSON_DATA=$(echo ${JSON_DATA} | jq -c ".prerelease=${PRERELEASE}") JSON_DATA=$(echo ${JSON_DATA} | jq -c ".prerelease=${PRERELEASE}")
JSON_DATA=$(echo ${JSON_DATA} | jq -c ".body=\"${RELBODY}\"") JSON_DATA=$(echo ${JSON_DATA} | jq -c ".body=\"${RELBODY}\"")
RELEASE_DATA=$(curl --data "${JSON_DATA}" -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/v2fly/V2FlyBleedingEdgeBinary/releases) RELEASE_DATA=$(curl --data "${JSON_DATA}" -H "Authorization: token ${PERSONAL_TOKEN}" -X POST https://api.github.com/repos/v2fly/V2FlyBleedingEdgeBinary/releases)
echo $RELEASE_DATA echo $RELEASE_DATA
RELEASE_ID=$(echo $RELEASE_DATA | jq ".id") RELEASE_ID=$(echo $RELEASE_DATA | jq ".id")
@ -13,7 +13,7 @@ function uploadfile() {
CTYPE=$(file -b --mime-type $FILE) CTYPE=$(file -b --mime-type $FILE)
sleep 1 sleep 1
curl -H "Authorization: token ${GITHUB_TOKEN}" -H "Content-Type: ${CTYPE}" --data-binary @$FILE "https://uploads.github.com/repos/v2fly/V2FlyBleedingEdgeBinary/releases/${RELEASE_ID}/assets?name=$(basename $FILE)" curl -H "Authorization: token ${PERSONAL_TOKEN}" -H "Content-Type: ${CTYPE}" --data-binary @$FILE "https://uploads.github.com/repos/v2fly/V2FlyBleedingEdgeBinary/releases/${RELEASE_ID}/assets?name=$(basename $FILE)"
sleep 1 sleep 1
} }

View File

@ -22,7 +22,7 @@ GITHUB_RELEASE_TAG=${TRIGGER_REASON:${#CONST_refsB}:25}
echo ${GITHUB_RELEASE_TAG} echo ${GITHUB_RELEASE_TAG}
RELEASE_DATA=$(curl -H "Authorization: token ${GITHUB_TOKEN}" -X GET https://api.github.com/repos/v2fly/v2ray-core/releases/tags/${GITHUB_RELEASE_TAG}) RELEASE_DATA=$(curl -H "Authorization: token ${PERSONAL_TOKEN}" -X GET https://api.github.com/repos/v2fly/v2ray-core/releases/tags/${GITHUB_RELEASE_TAG})
echo $RELEASE_DATA echo $RELEASE_DATA
RELEASE_ID=$(echo $RELEASE_DATA | jq ".id") RELEASE_ID=$(echo $RELEASE_DATA | jq ".id")
@ -33,7 +33,7 @@ function uploadfile() {
CTYPE=$(file -b --mime-type $FILE) CTYPE=$(file -b --mime-type $FILE)
sleep 1 sleep 1
curl -H "Authorization: token ${GITHUB_TOKEN}" -H "Content-Type: ${CTYPE}" --data-binary @$FILE "https://uploads.github.com/repos/v2fly/v2ray-core/releases/${RELEASE_ID}/assets?name=$(basename $FILE)" curl -H "Authorization: token ${PERSONAL_TOKEN}" -H "Content-Type: ${CTYPE}" --data-binary @$FILE "https://uploads.github.com/repos/v2fly/v2ray-core/releases/${RELEASE_ID}/assets?name=$(basename $FILE)"
sleep 1 sleep 1
} }