mirror of https://github.com/doccano/doccano.git
Browse Source
Merge pull request #303 from CatalystCode/enhancement/test-mssql-database
Merge pull request #303 from CatalystCode/enhancement/test-mssql-database
Enhancement/Extend integration tests to cover SQL Server databasepull/334/head
Hiroki Nakayama
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 50 additions and 16 deletions
Split View
Diff Options
@ -0,0 +1,39 @@ |
|||
#!/usr/bin/env bash |
|||
|
|||
# parse arguments |
|||
mode="prod" |
|||
for opt in "$@"; do |
|||
case "${opt}" in |
|||
--dev) mode="dev" ;; |
|||
esac |
|||
done |
|||
|
|||
set -eo pipefail |
|||
|
|||
# install build dependencies |
|||
apt-get update |
|||
apt-get install --no-install-recommends -y \ |
|||
curl=7.52.1-5+deb9u9 \ |
|||
gnupg=2.1.18-8~deb9u4 \ |
|||
apt-transport-https=1.4.9 |
|||
|
|||
# install dependency to compile django-pyodbc-azure |
|||
if [[ "${mode}" = "dev" ]]; then |
|||
apt-get install --no-install-recommends -y \ |
|||
unixodbc-dev=2.3.4-1 |
|||
fi |
|||
|
|||
# add mssql repo |
|||
curl -fsS https://packages.microsoft.com/keys/microsoft.asc | apt-key add - |
|||
curl -fsS https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql.list |
|||
apt-get update |
|||
|
|||
# install mssql |
|||
ACCEPT_EULA=Y apt-get install --no-install-recommends -y \ |
|||
msodbcsql17=17.3.1.1-1 \ |
|||
mssql-tools=17.3.0.1-1 |
|||
|
|||
# remove build dependencies and artifacts |
|||
apt-get remove -y \ |
|||
curl gnupg apt-transport-https |
|||
rm -rf /var/lib/apt/lists/* |
Write
Preview
Loading…
Cancel
Save