|
1 |
| -#!/bin/sh -e |
2 |
| - |
3 |
| -# Copyright 2016 Google Inc. All rights reserved. |
| 1 | +#!/bin/bash -e |
| 2 | +# Copyright 2017 Google Inc. All rights reserved. |
4 | 3 | #
|
5 |
| -# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except |
6 |
| -# in compliance with the License. You may obtain a copy of the License at |
| 4 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +# you may not use this file except in compliance with the License. |
| 6 | +# You may obtain a copy of the License at |
7 | 7 | #
|
8 |
| -# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# http://www.apache.org/licenses/LICENSE-2.0 |
9 | 9 | #
|
10 |
| -# Unless required by applicable law or agreed to in writing, software distributed under the License |
11 |
| -# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
12 |
| -# or implied. See the License for the specific language governing permissions and limitations under |
13 |
| -# the License. |
| 10 | +# Unless required by applicable law or agreed to in writing, software |
| 11 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +# See the License for the specific language governing permissions and |
| 14 | +# limitations under the License. |
| 15 | + |
| 16 | +# Compiles the typescript sources to javascript and submits the files |
| 17 | +# to the pypi server specified as first parameter, defaults to testpypi |
| 18 | +# In order to run this script locally, make sure you have the following: |
| 19 | +# - Typescript installed |
| 20 | +# - A configured ~/.pypi.rc containing your pypi/testpypi credentials with |
| 21 | +# the server names matching the name you're passing in. |
| 22 | +# - Make sure the package version string in the setup.py file is updated. |
| 23 | +# It will get rejected by the server if it already exists |
| 24 | +# - If this is a new release, make sure the release notes are updated |
| 25 | +# and create a new release tag |
| 26 | + |
| 27 | +tsc --module amd --noImplicitAny datalab/notebook/static/*.ts |
| 28 | +tsc --module amd --noImplicitAny google/datalab/notebook/static/*.ts |
14 | 29 |
|
15 |
| -# Build a distribution package |
16 |
| -tsc --module amd --noImplicitAny --outdir datalab/notebook/static datalab/notebook/static/*.ts |
17 |
| -python setup.py bdist_wheel |
18 |
| -rm datalab/notebook/static/*.js |
| 30 | +server="${1:-testpypi}" |
| 31 | +echo "Submitting package to ${server}" |
19 | 32 |
|
| 33 | +# Build and upload a distribution package |
| 34 | +python setup.py sdist upload -r "${server}" -q |
20 | 35 |
|
| 36 | +# Clean up |
| 37 | +rm -f datalab/notebook/static/*.js |
| 38 | +rm -f google/datalab/notebook/static/*.js |
0 commit comments