Skip to content

Commit

Permalink
fix: upstream files
Browse files Browse the repository at this point in the history
  • Loading branch information
daiyam committed Jan 6, 2025
1 parent 143556c commit 4eff785
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions dev/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ if [[ "${SKIP_BUILD}" == "no" ]]; then
fi

if [[ "${VSCODE_LATEST}" == "yes" ]]; then
jsonTmp=$( cat "upstream/${VSCODE_QUALITY}.json" | jq --arg 'tag' "${MS_TAG/\-insider/}" --arg 'commit' "${MS_COMMIT}" '. | .tag=$tag | .commit=$commit' )
echo "${jsonTmp}" > "upstream/${VSCODE_QUALITY}.json" && unset jsonTmp
jsonTmp=$( cat "./upstream/${VSCODE_QUALITY}.json" | jq --arg 'tag' "${MS_TAG/\-insider/}" --arg 'commit' "${MS_COMMIT}" '. | .tag=$tag | .commit=$commit' )
echo "${jsonTmp}" > "./upstream/${VSCODE_QUALITY}.json" && unset jsonTmp
fi
fi

Expand Down
6 changes: 3 additions & 3 deletions get_repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ if [[ "${CI_BUILD}" != "no" ]]; then
fi

if [[ -z "${RELEASE_VERSION}" ]]; then
if [[ "${VSCODE_LATEST}" == "yes" ]] || [[ ! -f "upstream/${VSCODE_QUALITY}.json" ]]; then
if [[ "${VSCODE_LATEST}" == "yes" ]] || [[ ! -f "./upstream/${VSCODE_QUALITY}.json" ]]; then
echo "Retrieve lastest version"
UPDATE_INFO=$( curl --silent --fail "https://update.code.visualstudio.com/api/update/darwin/${VSCODE_QUALITY}/0000000000000000000000000000000000000000" )
else
echo "Get version from ${VSCODE_QUALITY}.json"
MS_COMMIT=$( jq -r '.commit' "upstream/${VSCODE_QUALITY}.json" )
MS_TAG=$( jq -r '.tag' "upstream/${VSCODE_QUALITY}.json" )
MS_COMMIT=$( jq -r '.commit' "./upstream/${VSCODE_QUALITY}.json" )
MS_TAG=$( jq -r '.tag' "./upstream/${VSCODE_QUALITY}.json" )
fi

if [[ -z "${MS_COMMIT}" ]]; then
Expand Down
4 changes: 2 additions & 2 deletions update_upstream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ if [[ -z "${GH_TOKEN}" ]] && [[ -z "${GITHUB_TOKEN}" ]] && [[ -z "${GH_ENTERPRIS
exit 0
fi

jsonTmp=$( cat "upstream/${VSCODE_QUALITY}.json" | jq --arg 'tag' "${MS_TAG/\-insider/}" --arg 'commit' "${MS_COMMIT}" '. | .tag=$tag | .commit=$commit' )
echo "${jsonTmp}" > "upstream/${VSCODE_QUALITY}.json" && unset jsonTmp
jsonTmp=$( cat "./upstream/${VSCODE_QUALITY}.json" | jq --arg 'tag' "${MS_TAG/\-insider/}" --arg 'commit' "${MS_COMMIT}" '. | .tag=$tag | .commit=$commit' )
echo "${jsonTmp}" > "./upstream/${VSCODE_QUALITY}.json" && unset jsonTmp

git config user.email "$( echo "${GITHUB_USERNAME}" | awk '{print tolower($0)}' )[email protected]"
git config user.name "${GITHUB_USERNAME} CI"
Expand Down

0 comments on commit 4eff785

Please sign in to comment.