1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-21 09:36:34 -05:00

Update variables (#454)

due to https://github.com/v2fly/V2BuildAssist/pull/4
This commit is contained in:
Loyalsoldier 2020-11-25 11:25:33 +08:00 committed by GitHub
parent 7acf515258
commit e74c03541e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View File

@ -33,13 +33,13 @@ steps:
displayName: "Generate Bleeding Edge Release"
env:
WORKDIR: $(system.defaultWorkingDirectory)
GITHUB_TOKEN: $(GITHUB_TOKEN)
PERSONAL_TOKEN: $(GITHUB_TOKEN)
PRERELEASE: true
RELEASE_TAG: unstable-$(Build.SourceVersion)
RELEASE_SHA: $(Build.SourceVersion)
TRIGGER_REASON: $(Build.SourceBranch)
GITHUB_REPO_OWNER: v2fly
GITHUB_REPO_NAME: v2ray-core
COMMENT_TARGETTED_REPO_OWNER: v2fly
COMMENT_TARGETTED_REPO_NAME: v2ray-core
- script: |
echo $RELEASE_TAG
./release/tagrelease.sh
@ -47,7 +47,7 @@ steps:
displayName: "Generate Tag Release"
env:
WORKDIR: $(system.defaultWorkingDirectory)
GITHUB_TOKEN: $(GITHUB_TOKEN)
PERSONAL_TOKEN: $(GITHUB_TOKEN)
PRERELEASE: true
RELEASE_TAG: unstable-$(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 ${JSON_DATA} | jq -c ".prerelease=${PRERELEASE}")
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
RELEASE_ID=$(echo $RELEASE_DATA | jq ".id")
@ -13,7 +13,7 @@ function uploadfile() {
CTYPE=$(file -b --mime-type $FILE)
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
}

View File

@ -22,7 +22,7 @@ GITHUB_RELEASE_TAG=${TRIGGER_REASON:${#CONST_refsB}:25}
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
RELEASE_ID=$(echo $RELEASE_DATA | jq ".id")
@ -33,7 +33,7 @@ function uploadfile() {
CTYPE=$(file -b --mime-type $FILE)
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
}