mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 11:31:57 +00:00
24af087585
This includes all the changes reverted in https://dart-review.googlesource.com/c/sdk/+/289062 This also contains `https://dart.googlesource.com/pub.git/+/c939e81f Fix issue with _ in package names in dart add (3838)` fixing the reason for the revert. Changes: ``` > git log --format="%C(auto) %h %s" 048e3ad..4bd757c https://dart.googlesource.com/pub.git/+/4bd757ce Handle http errors gracefully when downloading archive (3811) https://dart.googlesource.com/pub.git/+/c939e81f Fix issue with _ in package names in dart add (3838) https://dart.googlesource.com/pub.git/+/9df0fddf Lazy construction of cache path. (3837) https://dart.googlesource.com/pub.git/+/554b3c32 Lazy loading of pubspec.yaml from entrypoint (3835) https://dart.googlesource.com/pub.git/+/cfaec21f Remove support for legacy credentials file (3824) https://dart.googlesource.com/pub.git/+/142baa3a Remove the exported deprecatedpubCommand (3825) https://dart.googlesource.com/pub.git/+/719afcf4 Remove obsolete TODO. (3827) https://dart.googlesource.com/pub.git/+/80d3e0d6 Remove obsolete tests (for features) (3834) https://dart.googlesource.com/pub.git/+/09eb6125 Remove barback, build and serve commands (3833) https://dart.googlesource.com/pub.git/+/e2e740ca Remove command list-package-dirs (3832) https://dart.googlesource.com/pub.git/+/6db5faa2 Remove support for PUB_CACHE in APPDATA on windows (3831) https://dart.googlesource.com/pub.git/+/a7a74857 Don't ignore a folder called 'packages' when publishing (3828) https://dart.googlesource.com/pub.git/+/70bfc022 Remove support for .pub package-local cache (3823) https://dart.googlesource.com/pub.git/+/4cd7a0a5 Use local variable for buffer (3826) https://dart.googlesource.com/pub.git/+/397e245e Remove obsolete TODO. (3821) https://dart.googlesource.com/pub.git/+/17ec4652 Handle malformatted content-hashes in cache, version listing or pubspec.lock (3818) https://dart.googlesource.com/pub.git/+/49c682c7 Add workflow to close need-info issues with responses. (3817) https://dart.googlesource.com/pub.git/+/bcb5ce18 Fix wrong action when executing git command (3814) https://dart.googlesource.com/pub.git/+/086c2d12 Larger size limit for caching package listings (3815) https://dart.googlesource.com/pub.git/+/94b43d05 remove an extra period from a publish message (3812) https://dart.googlesource.com/pub.git/+/d69493e5 Don't allow non-null-safety constraints in the root pubspec (3800) https://dart.googlesource.com/pub.git/+/3514d7e7 Fail gracefully when tar file contains duplicate entries (3805) https://dart.googlesource.com/pub.git/+/0b3b8b44 Give full error even in summary mode (3804) https://dart.googlesource.com/pub.git/+/09c29722 Allow adding and removing dependency overrides (3716) https://dart.googlesource.com/pub.git/+/7184d1b5 accept 'topics' property in pubspec.yaml (3796) https://dart.googlesource.com/pub.git/+/cd106dfd Improve usage text of get (3792) https://dart.googlesource.com/pub.git/+/019d61cb Handle bad git revisions (3791) https://dart.googlesource.com/pub.git/+/e3ff7a99 Use 'pkg' and 'packages' to trigger suggestions for the pub command (3731) https://dart.googlesource.com/pub.git/+/ea24bf22 Better error when path dependency has no pubspec.yaml (3787) https://dart.googlesource.com/pub.git/+/da2a0144 Drop --use-data-isolate-strategy flag for tests (3788) https://dart.googlesource.com/pub.git/+/a565858e Improve documentation of `pub token` and subcommands (3778) https://dart.googlesource.com/pub.git/+/dd320459 Add test for publishing and consuming files with unicode characters in name (3785) https://dart.googlesource.com/pub.git/+/c4226d9f Fail tests on errors thrown by test PackageServer (3784) https://dart.googlesource.com/pub.git/+/12019939 Consider pubspec_overrides.yaml when publishing (3782) https://dart.googlesource.com/pub.git/+/d8a97497 Allow addition of tokens for insecure localhost repositories (3777) ``` Diff: https://dart.googlesource.com/pub.git/+/048e3ad2b5e1b4ebe6883addbc95722be6904a7b..4bd757ce1dad04035fb0dbc6156879af23d8b3b8/ Change-Id: I67babf094b7cc4152c5c4ccc4b3e536634a57fc2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289201 Commit-Queue: Sigurd Meldgaard <sigurdm@google.com> Reviewed-by: William Hesse <whesse@google.com>
69 lines
2 KiB
Python
Executable file
69 lines
2 KiB
Python
Executable file
#!/usr/bin/env python3
|
|
# Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
|
|
# for details. All rights reserved. Use of this source code is governed by a
|
|
# BSD-style license that can be found in the LICENSE file.
|
|
|
|
import optparse
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
import shutil
|
|
import tempfile
|
|
|
|
PUBSPEC = """name: pub_integration_test
|
|
environment:
|
|
sdk: '^2.19.0'
|
|
dependencies:
|
|
shelf:
|
|
test:
|
|
"""
|
|
|
|
|
|
def Main():
|
|
parser = optparse.OptionParser()
|
|
parser.add_option(
|
|
'--mode', action='store', dest='mode', type='string', default='release')
|
|
parser.add_option('--arch',
|
|
action='store',
|
|
dest='arch',
|
|
type='string',
|
|
default='x64')
|
|
|
|
(options, args) = parser.parse_args()
|
|
|
|
arch = 'ARM64' if options.arch == 'arm64' else 'X64'
|
|
mode = ('Debug' if options.mode == 'debug' else 'Release')
|
|
|
|
out_dir = 'xcodebuild' if sys.platform == 'darwin' else 'out'
|
|
extension = '' if not sys.platform == 'win32' else '.exe'
|
|
dart = os.path.abspath('%s/%s%s/dart-sdk/bin/dart%s' %
|
|
(out_dir, mode, arch, extension))
|
|
print(dart)
|
|
|
|
working_dir = tempfile.mkdtemp()
|
|
try:
|
|
pub_cache_dir = working_dir + '/pub_cache'
|
|
env = os.environ.copy()
|
|
env['PUB_CACHE'] = pub_cache_dir
|
|
|
|
with open(working_dir + '/pubspec.yaml', 'w') as pubspec_yaml:
|
|
pubspec_yaml.write(PUBSPEC)
|
|
|
|
exit_code = subprocess.call([dart, 'pub', 'get'],
|
|
cwd=working_dir,
|
|
env=env)
|
|
if exit_code != 0:
|
|
return exit_code
|
|
|
|
exit_code = subprocess.call([dart, 'pub', 'upgrade'],
|
|
cwd=working_dir,
|
|
env=env)
|
|
if exit_code != 0:
|
|
return exit_code
|
|
finally:
|
|
shutil.rmtree(working_dir)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
sys.exit(Main())
|