From 092bc05bafbdfcb12db3355333664c458d2c33d6 Mon Sep 17 00:00:00 2001 From: Brian O'Neill Date: Mon, 7 Aug 2017 14:20:12 -0700 Subject: [PATCH 01/10] Bump version to 1.0.0a19 --- .bumpversion.cfg | 2 +- mssqlscripter/__init__.py | 2 +- mssqltoolsservice/mssqltoolsservice/__init__.py | 2 +- mssqltoolsservice/setup.py | 2 +- setup.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 50835a7..0844c0b 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.0.0a18 +current_version = 1.0.0a19 parse = (?P\d+)\.(?P\d+)\.(?P\d+)((?P.*))(?P\d+) serialize = {major}.{minor}.{patch}{release}{release_version} diff --git a/mssqlscripter/__init__.py b/mssqlscripter/__init__.py index 154b81d..fe92a3d 100644 --- a/mssqlscripter/__init__.py +++ b/mssqlscripter/__init__.py @@ -3,4 +3,4 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -__version__ = '1.0.0a18' +__version__ = '1.0.0a19' diff --git a/mssqltoolsservice/mssqltoolsservice/__init__.py b/mssqltoolsservice/mssqltoolsservice/__init__.py index d08039a..84bb2de 100644 --- a/mssqltoolsservice/mssqltoolsservice/__init__.py +++ b/mssqltoolsservice/mssqltoolsservice/__init__.py @@ -9,7 +9,7 @@ import os import platform -__version__ = '1.0.0a18' +__version__ = '1.0.0a19' def get_executable_path(): diff --git a/mssqltoolsservice/setup.py b/mssqltoolsservice/setup.py index 01fe5bb..38f23c4 100644 --- a/mssqltoolsservice/setup.py +++ b/mssqltoolsservice/setup.py @@ -12,7 +12,7 @@ # This version number is in place in two places and must be in sync with # mssqlscripter's version in setup.py. -MSSQLTOOLSSERVICE_VERSION = '1.0.0a18' +MSSQLTOOLSSERVICE_VERSION = '1.0.0a19' # If we have source, validate version numbers match to prevent # uploading releases with mismatched versions. diff --git a/setup.py b/setup.py index aa0874c..046464e 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ # This version number is in place in two places and must be in sync with # mssqltoolsservice's version in setup.py. -MSSQLSCRIPTER_VERSION = '1.0.0a18' +MSSQLSCRIPTER_VERSION = '1.0.0a19' # If we have the source, validate our setup version matches source version. # This will prevent uploading releases with mismatched versions. This will From e35c317e33d3a69bf4f01aad6ef49dcfb7994156 Mon Sep 17 00:00:00 2001 From: Brian O'Neill Date: Mon, 7 Aug 2017 14:33:10 -0700 Subject: [PATCH 02/10] Use .NET Core 2.0 sqltoolsservice --- mssqltoolsservice/buildwheels.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/mssqltoolsservice/buildwheels.py b/mssqltoolsservice/buildwheels.py index c57f0ca..a2eb8e1 100644 --- a/mssqltoolsservice/buildwheels.py +++ b/mssqltoolsservice/buildwheels.py @@ -17,20 +17,20 @@ from urllib.request import urlopen -DOWNLOAD_URL_BASE = 'https://mssqlscripter.blob.core.windows.net/sqltoolsservice-08-01-2017/' +DOWNLOAD_URL_BASE = 'https://mssqlscripter.blob.core.windows.net/sqltoolsservice-08-07-2017/' # Supported platform key's must match those in mssqlscript's setup.py. SUPPORTED_PLATFORMS = { - 'CentOS_7': DOWNLOAD_URL_BASE + 'microsoft.sqltools.servicelayer-centos-x64-netcoreapp1.0.tar.gz', - 'Debian_8': DOWNLOAD_URL_BASE + 'microsoft.sqltools.servicelayer-debian-x64-netcoreapp1.0.tar.gz', - 'Fedora_23': DOWNLOAD_URL_BASE + 'microsoft.sqltools.servicelayer-fedora-x64-netcoreapp1.0.tar.gz', - 'openSUSE_13_2': DOWNLOAD_URL_BASE + 'microsoft.sqltools.servicelayer-opensuse-x64-netcoreapp1.0.tar.gz', - 'OSX_10_11_64': DOWNLOAD_URL_BASE + 'microsoft.sqltools.servicelayer-osx-x64-netcoreapp1.0.tar.gz', - 'RHEL_7': DOWNLOAD_URL_BASE + 'microsoft.sqltools.servicelayer-rhel-x64-netcoreapp1.0.tar.gz', - 'Ubuntu_14': DOWNLOAD_URL_BASE + 'microsoft.sqltools.servicelayer-ubuntu14-x64-netcoreapp1.0.tar.gz', - 'Ubuntu_16': DOWNLOAD_URL_BASE + 'microsoft.sqltools.servicelayer-ubuntu16-x64-netcoreapp1.0.tar.gz', - 'Windows_7_64': DOWNLOAD_URL_BASE + 'microsoft.sqltools.servicelayer-win-x64-netcoreapp1.0.zip', - 'Windows_7_86': DOWNLOAD_URL_BASE + 'microsoft.sqltools.servicelayer-win-x86-netcoreapp1.0.zip', + 'CentOS_7': DOWNLOAD_URL_BASE + 'microsoft.sqltools.servicelayer-centos-x64-netcoreapp2.0.tar.gz', + 'Debian_8': DOWNLOAD_URL_BASE + 'microsoft.sqltools.servicelayer-debian-x64-netcoreapp2.0.tar.gz', + 'Fedora_23': DOWNLOAD_URL_BASE + 'microsoft.sqltools.servicelayer-fedora-x64-netcoreapp2.0.tar.gz', + 'openSUSE_13_2': DOWNLOAD_URL_BASE + 'microsoft.sqltools.servicelayer-opensuse-x64-netcoreapp2.0.tar.gz', + 'OSX_10_11_64': DOWNLOAD_URL_BASE + 'microsoft.sqltools.servicelayer-osx-x64-netcoreapp2.0.tar.gz', + 'RHEL_7': DOWNLOAD_URL_BASE + 'microsoft.sqltools.servicelayer-rhel-x64-netcoreapp2.0.tar.gz', + 'Ubuntu_14': DOWNLOAD_URL_BASE + 'microsoft.sqltools.servicelayer-ubuntu14-x64-netcoreapp2.0.tar.gz', + 'Ubuntu_16': DOWNLOAD_URL_BASE + 'microsoft.sqltools.servicelayer-ubuntu16-x64-netcoreapp2.0.tar.gz', + 'Windows_7_64': DOWNLOAD_URL_BASE + 'microsoft.sqltools.servicelayer-win-x64-netcoreapp2.0.zip', + 'Windows_7_86': DOWNLOAD_URL_BASE + 'microsoft.sqltools.servicelayer-win-x86-netcoreapp2.0.zip' } CURRENT_DIRECTORY = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) From 4f60d19f11c8da070852e20af4948d0a18311961 Mon Sep 17 00:00:00 2001 From: Brian O'Neill Date: Mon, 14 Aug 2017 10:48:33 -0700 Subject: [PATCH 03/10] Add build script to upload to azure blob storage --- build.py | 123 +++++++++++++++++++++++++++++++++++++++++++ dev_requirements.txt | 3 +- dev_setup.py | 8 ++- setup.py | 4 +- sql-xplat-cli.pyproj | 20 ++++--- utility.py | 10 ++++ 6 files changed, 154 insertions(+), 14 deletions(-) create mode 100644 build.py diff --git a/build.py b/build.py new file mode 100644 index 0000000..3b17869 --- /dev/null +++ b/build.py @@ -0,0 +1,123 @@ +#!/usr/bin/env python + +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from __future__ import print_function +import os +import re +import sys +import tempfile +import utility +from azure.storage.blob import BlockBlobService, ContentSettings + +BLOB_SERVICE_CONNECTION_STRING = os.environ.get('AZURE_STORAGE_CONNECTION_STRING') +BLOB_CONTAINER_NAME = 'simple' +UPLOADED_PACKAGE_LINKS = [] + + +def print_heading(heading, f=None): + print('{0}\n{1}\n{0}'.format('=' * len(heading), heading), file=f) + + +def upload_index_file(service, blob_name, title, links): + print('Uploading index file {}'.format(blob_name)) + service.create_blob_from_text( + container_name=BLOB_CONTAINER_NAME, + blob_name=blob_name, + text="{0}

{0}

{1}" + .format(title, '\n'.join( + ['{0}
'.format(link) for link in links])), + content_settings=ContentSettings( + content_type='text/html', + content_disposition=None, + content_encoding=None, + content_language=None, + content_md5=None, + cache_control=None + ) + ) + + +def gen_pkg_index_html(service, pkg_name): + links = [] + index_file_name = pkg_name+'/' + for blob in list(service.list_blobs(BLOB_CONTAINER_NAME, prefix=index_file_name)): + if blob.name == index_file_name: + # Exclude the index file from being added to the list + continue + links.append(blob.name.replace(index_file_name, '')) + upload_index_file(service, index_file_name, 'Links for {}'.format(pkg_name), links) + UPLOADED_PACKAGE_LINKS.append(index_file_name) + + +def upload_package(service, file_path, pkg_name): + print('Uploading {}'.format(file_path)) + file_name = os.path.basename(file_path) + blob_name = '{}/{}'.format(pkg_name, file_name) + service.create_blob_from_path( + container_name=BLOB_CONTAINER_NAME, + blob_name=blob_name, + file_path=file_path + ) + gen_pkg_index_html(service, pkg_name) + + +def build(options): + + supported_actions = ['nightly'] + action = None + + if len(options) >= 1: + if options[0] not in supported_actions: + print('Please provide a supported action {}.'.format(supported_actions)) + return + action = options[0] + + + print_heading('Cleanup') + + # clean + utility.clean_up(utility.MSSQLSCRIPTER_DIST_DIRECTORY) + utility.clean_up(utility.MSSQLTOOLSSERVICE_DIST_DIRECTORY) + utility.cleaun_up_egg_info_sub_directories(utility.ROOT_DIR) + utility.cleaun_up_egg_info_sub_directories(utility.MSSQLTOOLSSERVICE_DIRECTORY) + + print_heading('Running setup') + + # install general requirements. + utility.exec_command('pip install -r dev_requirements.txt', utility.ROOT_DIR) + + print_heading('Running mssql-scripter tests') + utility.exec_command('tox', utility.ROOT_DIR, continue_on_error = False) + + print_heading('Building mssql-scripter pip package') + utility.exec_command('python setup.py check -r -s sdist', utility.ROOT_DIR, continue_on_error = False) + + print_heading('Building mssqltoolsservice pip package') + utility.exec_command('python buildwheels.py', utility.MSSQLTOOLSSERVICE_DIRECTORY, continue_on_error = False) + + if action == 'nightly': + assert BLOB_SERVICE_CONNECTION_STRING, 'Set AZURE_STORAGE_CONNECTION_STRING environment variable' + blob_service = BlockBlobService(connection_string=BLOB_SERVICE_CONNECTION_STRING) + + print_heading('Uploading packages to blob storage ') + for pkg in os.listdir(utility.MSSQLSCRIPTER_DIST_DIRECTORY): + pkg_path = os.path.join(utility.MSSQLSCRIPTER_DIST_DIRECTORY, pkg) + print('Uploading package {}'.format(pkg_path)) + upload_package(blob_service, pkg_path, 'mssql-scripter') + + for pkg in os.listdir(utility.MSSQLTOOLSSERVICE_DIST_DIRECTORY): + pkg_path = os.path.join(utility.MSSQLTOOLSSERVICE_DIST_DIRECTORY, pkg) + pkg_name = os.path.basename(pkg_path).split('-')[0].replace('_', '-').lower() + print('Uploading package {}'.format(pkg_name)) + upload_package(blob_service, pkg_path, pkg_name) + + # Upload the final index file + upload_index_file(blob_service, 'index.html', 'Simple Index', UPLOADED_PACKAGE_LINKS) + + +if __name__ == '__main__': + build(sys.argv[1:]) \ No newline at end of file diff --git a/dev_requirements.txt b/dev_requirements.txt index e370534..bb69fee 100644 --- a/dev_requirements.txt +++ b/dev_requirements.txt @@ -11,4 +11,5 @@ flake8 >= 3.3.0 pytest >= 3.0.7 pytest-cov >= 2.5.1 readme_renderer >= 17.2 -docutils >= 0.13.1 \ No newline at end of file +docutils >= 0.13.1 +azure-storage >= 0.33.0 \ No newline at end of file diff --git a/dev_setup.py b/dev_setup.py index 1f10eaf..ebbaccb 100644 --- a/dev_setup.py +++ b/dev_setup.py @@ -12,18 +12,16 @@ import setup import utility -root_dir = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) - print('Running dev setup...') -print('Root directory \'{}\'\n'.format(root_dir)) +print('Root directory \'{}\'\n'.format(utility.ROOT_DIR)) # install general requirements. -utility.exec_command('pip install -r dev_requirements.txt', root_dir) +utility.exec_command('pip install -r dev_requirements.txt', utility.ROOT_DIR) # install mssqltoolsservice if this platform supports it. mssqltoolsservice_package_name = os.environ['MSSQLTOOLSSERVICE_PACKAGE_NAME'] print('Installing {}...'.format(mssqltoolsservice_package_name)) # mssqltoolsservice package name is retrieved from environment variable set by setup.py. -utility.exec_command('pip install {}'.format(mssqltoolsservice_package_name), root_dir) +utility.exec_command('pip install {}'.format(mssqltoolsservice_package_name), utility.ROOT_DIR) print('Finished dev setup.') diff --git a/setup.py b/setup.py index 046464e..15db07c 100644 --- a/setup.py +++ b/setup.py @@ -56,7 +56,7 @@ toolsservice_version.group(1))) sys.exit(1) -MSSQLTOOLSSERVICE_PACKAGE_NAME = 'mssqltoolsservice_{}=={}' +MSSQLTOOLSSERVICE_PACKAGE_NAME = 'mssqltoolsservice-{}=={}' MSSQLTOOLSSERVICE_PACKAGE_SUFFIX = [ 'CentOS_7', 'Debian_8', @@ -204,7 +204,7 @@ def get_mssqltoolsservice_package_name(run_time_id=_get_runtime_id()): # set package suffix name for other uses like building wheels outside of setup.py. os.environ['MSSQLTOOLSSERVICE_PACKAGE_SUFFIX'] = run_time_id return MSSQLTOOLSSERVICE_PACKAGE_NAME.format( - run_time_id, MSSQLSCRIPTER_VERSION) + run_time_id, MSSQLSCRIPTER_VERSION).replace('_', '-').lower() raise EnvironmentError('mssqltoolsservice is not supported on this platform.') diff --git a/sql-xplat-cli.pyproj b/sql-xplat-cli.pyproj index dd14868..5885ee9 100644 --- a/sql-xplat-cli.pyproj +++ b/sql-xplat-cli.pyproj @@ -5,15 +5,16 @@ 2.0 {f4bb6290-43f3-4f35-b26e-067c5ef8e64b} - mssqlscripter\main.py + build.py . . . {888888a0-9f3d-457c-b088-3a5042f75d52} Standard Python launcher - - - -S localhost -d AdventureWorks2014 + {9a7a9026-48c1-4688-9d5d-e5699d47d074} + 2.7 + + False False @@ -25,7 +26,8 @@ - + + @@ -43,13 +45,15 @@ - + + Code + @@ -87,6 +91,10 @@ + + + + \ No newline at end of file diff --git a/utility.py b/utility.py index 6b83242..0b8f10f 100644 --- a/utility.py +++ b/utility.py @@ -9,6 +9,10 @@ import shutil import sys +ROOT_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) + +MSSQLTOOLSSERVICE_DIRECTORY = os.path.abspath(os.path.join( + os.path.abspath(__file__), '..', 'mssqltoolsservice')) MSSQLSCRIPTER_DIST_DIRECTORY = os.path.abspath( os.path.join(os.path.abspath(__file__), '..', 'dist')) @@ -32,6 +36,12 @@ def exec_command(command, directory, continue_on_error=True): pass +def cleaun_up_egg_info_sub_directories(directory): + for f in os.listdir(directory): + if f.endswith(".egg-info"): + clean_up(os.path.join(directory, f)) + + def clean_up(directory): """ Delete directory. From cc2689ba328985383545e43367b4258db77ef672 Mon Sep 17 00:00:00 2001 From: Brian O'Neill Date: Mon, 14 Aug 2017 14:37:46 -0700 Subject: [PATCH 04/10] Upgrade to VS 2017 --- sql-xplat-cli.pyproj | 11 ++++------- sql-xplat-cli.sln | 7 +++++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sql-xplat-cli.pyproj b/sql-xplat-cli.pyproj index 5885ee9..9d6e35e 100644 --- a/sql-xplat-cli.pyproj +++ b/sql-xplat-cli.pyproj @@ -11,8 +11,7 @@ . {888888a0-9f3d-457c-b088-3a5042f75d52} Standard Python launcher - {9a7a9026-48c1-4688-9d5d-e5699d47d074} - 2.7 + Global|PythonCore|2.7 False @@ -22,7 +21,6 @@ 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets @@ -92,9 +90,8 @@ - - + + - - + \ No newline at end of file diff --git a/sql-xplat-cli.sln b/sql-xplat-cli.sln index 97bcd3c..8051f79 100644 --- a/sql-xplat-cli.sln +++ b/sql-xplat-cli.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 +# Visual Studio 15 +VisualStudioVersion = 15.0.26730.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "sql-xplat-cli", "sql-xplat-cli.pyproj", "{F4BB6290-43F3-4F35-B26E-067C5EF8E64B}" EndProject @@ -17,4 +17,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {1DD06426-BEB7-4299-B45E-04535B761301} + EndGlobalSection EndGlobal From 87ccb69809cde2cfb442ac71cc81501bf4602c2b Mon Sep 17 00:00:00 2001 From: Brian O'Neill Date: Mon, 14 Aug 2017 14:48:57 -0700 Subject: [PATCH 05/10] Remove 3.3 as supported Python version --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 15db07c..221ba90 100644 --- a/setup.py +++ b/setup.py @@ -217,7 +217,6 @@ def get_mssqltoolsservice_package_name(run_time_id=_get_runtime_id()): 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', From 03a09c014d7be223a48894f5fc2f4c2367f1dafc Mon Sep 17 00:00:00 2001 From: Brian O'Neill Date: Mon, 14 Aug 2017 14:55:34 -0700 Subject: [PATCH 06/10] Remove Python 3.3 from travis and appveyor --- .travis.yml | 2 -- appveyor.yml | 2 -- 2 files changed, 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index bafc37f..cd2f2a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,8 +10,6 @@ matrix: env: TOXENV=py27 - os: linux python: "2.7" - - os: linux - python: "3.3" - os: linux python: "3.4" - os: linux diff --git a/appveyor.yml b/appveyor.yml index d07ec5d..3ae2e5f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,8 +3,6 @@ environment: matrix: - TOXENV: "py27" PYTHON: "C:\\Python27" - - TOXENV: "py33" - PYTHON: "C:\\Python33" - TOXENV: "py34" PYTHON: "C:\\Python34" - TOXENV: "py35" From d34765bc421da795c4a983fbe84b7a467d3cea04 Mon Sep 17 00:00:00 2001 From: Brian O'Neill Date: Mon, 14 Aug 2017 15:31:01 -0700 Subject: [PATCH 07/10] Fail fast when running 'build.py nightly' and AZURE_STORAGE_CONNECTION_STRING is not set. --- build.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.py b/build.py index 3b17869..2d9f853 100644 --- a/build.py +++ b/build.py @@ -76,6 +76,8 @@ def build(options): return action = options[0] + if action == 'nightly': + assert BLOB_SERVICE_CONNECTION_STRING, 'Set AZURE_STORAGE_CONNECTION_STRING environment variable' print_heading('Cleanup') @@ -100,7 +102,6 @@ def build(options): utility.exec_command('python buildwheels.py', utility.MSSQLTOOLSSERVICE_DIRECTORY, continue_on_error = False) if action == 'nightly': - assert BLOB_SERVICE_CONNECTION_STRING, 'Set AZURE_STORAGE_CONNECTION_STRING environment variable' blob_service = BlockBlobService(connection_string=BLOB_SERVICE_CONNECTION_STRING) print_heading('Uploading packages to blob storage ') From fee71d5b532521f4e87b138c0639090b1e90b967 Mon Sep 17 00:00:00 2001 From: Brian O'Neill Date: Mon, 14 Aug 2017 15:38:20 -0700 Subject: [PATCH 08/10] Consistently use AZURE_STORAGE_CONNECTION_STRING as the environment variable --- build.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.py b/build.py index 2d9f853..a03e814 100644 --- a/build.py +++ b/build.py @@ -13,7 +13,7 @@ import utility from azure.storage.blob import BlockBlobService, ContentSettings -BLOB_SERVICE_CONNECTION_STRING = os.environ.get('AZURE_STORAGE_CONNECTION_STRING') +AZURE_STORAGE_CONNECTION_STRING = os.environ.get('AZURE_STORAGE_CONNECTION_STRING') BLOB_CONTAINER_NAME = 'simple' UPLOADED_PACKAGE_LINKS = [] @@ -77,7 +77,7 @@ def build(options): action = options[0] if action == 'nightly': - assert BLOB_SERVICE_CONNECTION_STRING, 'Set AZURE_STORAGE_CONNECTION_STRING environment variable' + assert AZURE_STORAGE_CONNECTION_STRING, 'Set AZURE_STORAGE_CONNECTION_STRING environment variable' print_heading('Cleanup') @@ -102,7 +102,7 @@ def build(options): utility.exec_command('python buildwheels.py', utility.MSSQLTOOLSSERVICE_DIRECTORY, continue_on_error = False) if action == 'nightly': - blob_service = BlockBlobService(connection_string=BLOB_SERVICE_CONNECTION_STRING) + blob_service = BlockBlobService(connection_string=AZURE_STORAGE_CONNECTION_STRING) print_heading('Uploading packages to blob storage ') for pkg in os.listdir(utility.MSSQLSCRIPTER_DIST_DIRECTORY): From 9c950ecd3111cc39a29029e9afdbe1cb3272be9e Mon Sep 17 00:00:00 2001 From: Brian O'Neill Date: Tue, 15 Aug 2017 16:20:32 -0700 Subject: [PATCH 09/10] In .NET Core 2.0 the Microsoft.SqlTools.ServiceLayer executable does not have any periods --- mssqlscripter/jsonrpc/contracts/tests/test_scripting.py | 2 +- mssqltoolsservice/mssqltoolsservice/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mssqlscripter/jsonrpc/contracts/tests/test_scripting.py b/mssqlscripter/jsonrpc/contracts/tests/test_scripting.py index 5ebfcd3..e66f19a 100644 --- a/mssqlscripter/jsonrpc/contracts/tests/test_scripting.py +++ b/mssqlscripter/jsonrpc/contracts/tests/test_scripting.py @@ -362,7 +362,7 @@ def generate_new_baseline(self, file_name): # Point sqltoolsservice output to file. with io.open(file_name, 'wb') as baseline: tools_service_process = subprocess.Popen( - 'D:\\GitHub\\sqltoolsservice\\src\\Microsoft.SqlTools.ServiceLayer\\bin\\Debug\\netcoreapp1.0\\win7-x64\\Microsoft.SqlTools.ServiceLayer.exe', + 'D:\\GitHub\\sqltoolsservice\\src\\Microsoft.SqlTools.ServiceLayer\\bin\\Debug\\netcoreapp2.0\\win7-x64\\MicrosoftSqlToolsServiceLayer.exe', bufsize=0, stdin=subprocess.PIPE, stdout=baseline) diff --git a/mssqltoolsservice/mssqltoolsservice/__init__.py b/mssqltoolsservice/mssqltoolsservice/__init__.py index 84bb2de..b8502f2 100644 --- a/mssqltoolsservice/mssqltoolsservice/__init__.py +++ b/mssqltoolsservice/mssqltoolsservice/__init__.py @@ -28,7 +28,7 @@ def get_executable_path(): 'bin')) # Format name based on platform. - mssqltoolsservice_name = u'Microsoft.SqlTools.ServiceLayer{}'.format( + mssqltoolsservice_name = u'MicrosoftSqlToolsServiceLayer{}'.format( u'.exe' if (platform.system() == u'Windows') else u'') mssqltoolsservice_full_path = os.path.abspath(os.path.join(mssqltoolsservice_base_path, mssqltoolsservice_name)) From f1c17ce71ed4cdd7681f1c6d30356746711cb534 Mon Sep 17 00:00:00 2001 From: Brian O'Neill Date: Wed, 16 Aug 2017 21:04:48 -0700 Subject: [PATCH 10/10] Use SqlToolsService built with RTM .NET Core 2.0 version --- mssqltoolsservice/buildwheels.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mssqltoolsservice/buildwheels.py b/mssqltoolsservice/buildwheels.py index a2eb8e1..b02f215 100644 --- a/mssqltoolsservice/buildwheels.py +++ b/mssqltoolsservice/buildwheels.py @@ -17,7 +17,7 @@ from urllib.request import urlopen -DOWNLOAD_URL_BASE = 'https://mssqlscripter.blob.core.windows.net/sqltoolsservice-08-07-2017/' +DOWNLOAD_URL_BASE = 'https://mssqlscripter.blob.core.windows.net/sqltoolsservice-08-16-2017/' # Supported platform key's must match those in mssqlscript's setup.py. SUPPORTED_PLATFORMS = {