mirror of
https://github.com/VSCodium/vscodium.git
synced 2026-04-23 19:40:14 +10:00
fix: detect version based on the architecture (#950)
This commit is contained in:
2
.github/workflows/linux.yml
vendored
2
.github/workflows/linux.yml
vendored
@@ -113,6 +113,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Check version
|
- name: Check version
|
||||||
run: ./stores/snapcraft/check_version.sh
|
run: ./stores/snapcraft/check_version.sh
|
||||||
|
env:
|
||||||
|
SNAP_STORE_LOGIN: ${{ secrets.SNAP_STORE_LOGIN }}
|
||||||
|
|
||||||
- uses: docker/setup-qemu-action@v1
|
- uses: docker/setup-qemu-action@v1
|
||||||
if: env.SHOULD_DEPLOY == 'yes'
|
if: env.SHOULD_DEPLOY == 'yes'
|
||||||
|
|||||||
@@ -13,15 +13,19 @@ elif [[ "${GITHUB_EVENT_NAME}" == "push" ]]; then
|
|||||||
else
|
else
|
||||||
echo "It's a cron"
|
echo "It's a cron"
|
||||||
|
|
||||||
sudo curl -sS --unix-socket /run/snapd.socket http://localhost/v2/find\?q\=codium > snap_latest.json
|
echo "$SNAP_STORE_LOGIN" | snapcraft login --with -
|
||||||
SNAP_VERSION=$(jq -r '.result|map(select(.id == "lIZWXTqmo6LFSts5Cgk2VPlNwtysZAeH"))|last.version' snap_latest.json)
|
|
||||||
|
ARCHITECTURE=$(dpkg --print-architecture)
|
||||||
|
echo "Architecture: ${ARCHITECTURE}"
|
||||||
|
|
||||||
|
SNAP_VERSION=$(snapcraft list-revisions codium | grep -F stable* | grep ${ARCHITECTURE} | tr -s ' ' | cut -d ' ' -f 4)
|
||||||
echo "Snap version: ${SNAP_VERSION}"
|
echo "Snap version: ${SNAP_VERSION}"
|
||||||
|
|
||||||
wget --quiet https://api.github.com/repos/VSCodium/vscodium/releases -O gh_latest.json
|
wget --quiet https://api.github.com/repos/VSCodium/vscodium/releases -O gh_latest.json
|
||||||
GH_VERSION=$(jq -r 'sort_by(.tag_name)|last.tag_name' gh_latest.json)
|
GH_VERSION=$(jq -r 'sort_by(.tag_name)|last.tag_name' gh_latest.json)
|
||||||
echo "GH version: ${GH_VERSION}"
|
echo "GH version: ${GH_VERSION}"
|
||||||
|
|
||||||
rm -f snap_latest.json gh_latest.json
|
rm -f gh_latest.json
|
||||||
|
|
||||||
if [[ "${SNAP_VERSION}" == "${GH_VERSION}" ]]; then
|
if [[ "${SNAP_VERSION}" == "${GH_VERSION}" ]]; then
|
||||||
export SHOULD_DEPLOY="no"
|
export SHOULD_DEPLOY="no"
|
||||||
|
|||||||
Reference in New Issue
Block a user