Skip to content

Commit

Permalink
Removed ia32 builds
Browse files Browse the repository at this point in the history
  • Loading branch information
LOLINTERNETZ committed Aug 8, 2022
1 parent 87d91b4 commit 06d4eac
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@

### Added
- @tomer953 added support for fetching a specified number of recommended extensions `--total-recommended`.
- @Ebsan added support for fetching pre-release extensions `--prerelease-extensions` and fix fetching other extensions [#31](https://github.com/LOLINTERNETZ/vscodeoffline/issues/31).
- @Ebsan added support for specifying which Visual Studio Code version to masquerade as when fetching extensions `--vscode-version`.

### Changed
- Merge dependabot suggestions for CI pipeline updates.
- Utilise individual requests, rather than a Requests session, for fetching extensions to improve stability of fetch process. Should resolve [#33](https://github.com/LOLINTERNETZ/vscodeoffline/issues/33). Thanks @Ebsan for the fix and @annieherram for reporting.
- Updated build-in certificate and key to update its expiry [#37](https://github.com/LOLINTERNETZ/vscodeoffline/issues/37). Included CA chain aswell. Thanks for reporting @Ebsan.
- Removed platform suport for ia32 builds, as they're no longer provided since ~1.35.
- Split out this changelog.

### Fixed
- @tomer953 removed a duplicate flag to QueryFlags.
- @Ebsan fixed an issue with downloading cross-platform extensions [#24](https://github.com/LOLINTERNETZ/vscodeoffline/issues/24).

## [1.0.20]
### Fixed
Expand Down
27 changes: 19 additions & 8 deletions vscoffline/vsc.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
import os, io, json, hashlib, glob, datetime
import os
import io
import json
import hashlib
import glob
import datetime
from enum import IntFlag
from logzero import logger as log

PLATFORMS = ['win32', 'linux', 'linux-deb', 'linux-rpm', 'darwin', 'linux-snap', 'server-linux']
ARCHITECTURES = ['', 'x64', 'ia32']
PLATFORMS = ['win32', 'linux', 'linux-deb', 'linux-rpm',
'darwin', 'linux-snap', 'server-linux']
ARCHITECTURES = ['', 'x64']
BUILDTYPES = ['', 'archive', 'user']
QUALITIES = ['stable', 'insider']

Expand All @@ -21,6 +27,7 @@

TIMEOUT = 12


class QueryFlags(IntFlag):
__no_flags_name__ = 'NoneDefined'
NoneDefined = 0x0
Expand All @@ -36,6 +43,7 @@ class QueryFlags(IntFlag):
IncludeLatestVersionOnly = 0x200
Unpublished = 0x1000


class FilterType(IntFlag):
__no_flags_name__ = 'Target'
Tag = 1
Expand All @@ -48,6 +56,7 @@ class FilterType(IntFlag):
ExcludeWithFlags = 12
UndefinedType = 14


class SortBy(IntFlag):
__no_flags_name__ = 'NoneOrRelevance'
NoneOrRelevance = 0
Expand All @@ -59,18 +68,21 @@ class SortBy(IntFlag):
AverageRating = 6
WeightedRating = 12


class SortOrder(IntFlag):
__no_flags_name__ = 'Default'
Default = 0
Ascending = 1
Descending = 2


class MagicJsonEncoder(json.JSONEncoder):
def default(self, o):
if isinstance(o, datetime.datetime):
return o.isoformat()
return o.__dict__


class Utility(object):
"""
Utility tool
Expand All @@ -87,9 +99,9 @@ def hash_file_and_check(filepath, expectedchecksum):
h.update(chunk)
if expectedchecksum != h.hexdigest():
return False

return True

@staticmethod
def load_json(filepath):
result = []
Expand All @@ -105,7 +117,7 @@ def load_json(filepath):
log.debug(f'JSONDecodeError while processing {filepath}')
return []
return result

@staticmethod
def write_json(filepath, content):
with open(filepath, 'w') as outfile:
Expand All @@ -116,7 +128,7 @@ def first_file(filepath, reverse=False):
results = glob.glob(filepath)
if reverse:
results.sort(reverse=True)
#log.info(filepath)
# log.info(filepath)
if results and len(results) >= 1:
return results[0]
return False
Expand Down Expand Up @@ -164,4 +176,3 @@ def validate_quality(quality):
return True
else:
return False

0 comments on commit 06d4eac

Please sign in to comment.