mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-24 03:09:22 -06:00
Remove publish-js-sdk.py (#2786)
This file was renamed to publish-to-npm.py
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
# Copyright 2016 Attic Labs, Inc. All rights reserved.
|
||||
# Licensed under the Apache License, version 2.0:
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
import os, subprocess, json
|
||||
from distutils.version import LooseVersion
|
||||
from noms.pushd import pushd
|
||||
|
||||
packages = [
|
||||
'babel-preset-noms',
|
||||
'eslint-config-noms',
|
||||
'noms',
|
||||
'webpack-config',
|
||||
]
|
||||
|
||||
def main():
|
||||
for p in packages:
|
||||
with pushd(os.path.join('js', p)):
|
||||
npm_publish()
|
||||
|
||||
def npm_publish():
|
||||
with open('package.json') as pkg:
|
||||
data = json.load(pkg)
|
||||
package_name = data['name']
|
||||
deployed_version = LooseVersion(
|
||||
subprocess.check_output(['npm', 'info', package_name, 'version']).strip())
|
||||
|
||||
new_version = LooseVersion(data['version'])
|
||||
print '%s: Old version: %s, New version: %s' % (package_name, deployed_version, new_version)
|
||||
if new_version > deployed_version:
|
||||
subprocess.check_call(['npm', 'whoami'])
|
||||
subprocess.check_call(['npm', 'install'])
|
||||
subprocess.check_call(['npm', 'publish'])
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user