From f0403a67a17fc48bf0f3c551267e4e085fc58a02 Mon Sep 17 00:00:00 2001 From: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com> Date: Wed, 7 Oct 2020 20:04:09 +0800 Subject: [PATCH] Refine scripts (#279) --- release/bleedingrelease.sh | 2 +- release/install-release.sh | 2 +- release/mutilate/removeVSign.sh | 6 +++--- release/requestsign.sh | 4 ++-- release/requestsign_github.sh | 4 ++-- release/tagrelease.sh | 2 +- release/user-package.sh | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) mode change 100644 => 100755 release/mutilate/removeVSign.sh diff --git a/release/bleedingrelease.sh b/release/bleedingrelease.sh index 19a09780..1b3c0312 100755 --- a/release/bleedingrelease.sh +++ b/release/bleedingrelease.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash RELBODY="https://github.com/v2fly/v2ray-core/commit/${RELEASE_SHA}" JSON_DATA=$(echo "{}" | jq -c ".tag_name=\"${RELEASE_TAG}\"") diff --git a/release/install-release.sh b/release/install-release.sh index 61c7ee5d..4b2bde4a 100755 --- a/release/install-release.sh +++ b/release/install-release.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This file is accessible as https://install.direct/go.sh # Original source is located at github.com/v2fly/v2ray-core/release/install-release.sh diff --git a/release/mutilate/removeVSign.sh b/release/mutilate/removeVSign.sh old mode 100644 new mode 100755 index 525b48e8..aec2cbe2 --- a/release/mutilate/removeVSign.sh +++ b/release/mutilate/removeVSign.sh @@ -1,7 +1,7 @@ -#!/bin/bash +#!/usr/bin/env bash -export VROOT=$( dirname "${BASH_SOURCE[0]}" )/../../ +export VROOT=$(dirname "${BASH_SOURCE[0]}")/../../ rm $VROOT/infra/control/verify.go -sed -i '/VSign/d' $VROOT/go.mod \ No newline at end of file +sed -i '/VSign/d' $VROOT/go.mod diff --git a/release/requestsign.sh b/release/requestsign.sh index feb65f26..195a2412 100755 --- a/release/requestsign.sh +++ b/release/requestsign.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash RELEASE_DATA=$(curl --data "version=${SIGN_VERSION}" --data "password=${SIGN_SERVICE_PASSWORD}" -X POST "${SIGN_SERIVCE_URL}" ) echo $RELEASE_DATA @@ -25,4 +25,4 @@ function upload() { } curl "https://raw.githubusercontent.com/v2fly/Release/master/v2fly/${SIGN_VERSION}.Release" > Release -upload Release \ No newline at end of file +upload Release diff --git a/release/requestsign_github.sh b/release/requestsign_github.sh index 3a3dd6b4..f30a40dc 100755 --- a/release/requestsign_github.sh +++ b/release/requestsign_github.sh @@ -1,7 +1,7 @@ -#!/bin/bash +#!/usr/bin/env bash export SIGN_VERSION=$(cat $GITHUB_EVENT_PATH| jq -r ".release.tag_name") echo $SIGN_VERSION -$GITHUB_WORKSPACE/release/requestsign.sh \ No newline at end of file +$GITHUB_WORKSPACE/release/requestsign.sh diff --git a/release/tagrelease.sh b/release/tagrelease.sh index 5d183d64..dde6b979 100755 --- a/release/tagrelease.sh +++ b/release/tagrelease.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash CONST_refs="refs" diff --git a/release/user-package.sh b/release/user-package.sh index dba13ba0..5fd0d645 100755 --- a/release/user-package.sh +++ b/release/user-package.sh @@ -33,7 +33,7 @@ build_v2() { local VERSIONTAG=$(git describe --abbrev=0 --tags) fi - LDFLAGS="-s -w -buildid= -X v2ray.com/core.codename=${CODENAME} -X v2ray.com/core.build=${BUILDNAME} -X v2ray.com/core.version=${VERSIONTAG}" + LDFLAGS="-s -w -buildid= -X v2ray.codename=${CODENAME} -X v2ray.build=${BUILDNAME} -X v2ray.version=${VERSIONTAG}" echo ">>> Compile v2ray ..." env CGO_ENABLED=0 go build -o "$TMP"/v2ray"${EXESUFFIX}" -ldflags "$LDFLAGS" ./main