mirror of
https://github.com/dolthub/dolt.git
synced 2026-05-06 19:35:18 -05:00
Auto deploy Noms JS SDK (#1208)
This computes a new version based on the number of changes to the js directory. This does not yet actually publish the new version. I need to see how Travis behaves before I can do that. Towards #1200
This commit is contained in:
@@ -53,3 +53,8 @@ cache:
|
||||
- clients/pitchmap/ui/node_modules
|
||||
- clients/splore/node_modules
|
||||
- nomdl/codegen/test/node_modules
|
||||
deploy:
|
||||
provider: script
|
||||
script: tools/publish-js-sdk.py
|
||||
on:
|
||||
branch: master
|
||||
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import os, subprocess
|
||||
|
||||
def main():
|
||||
os.chdir('js')
|
||||
print os.getcwd()
|
||||
current_deployed_version = subprocess.check_output(['npm', 'info', '@attic/noms', 'version'])
|
||||
current_deployed_major_version = current_deployed_version.split('.')[0]
|
||||
log = subprocess.check_output(['git', 'log', '--oneline', '--', '.'])
|
||||
new_major_version = len(log.splitlines())
|
||||
print 'Old version: %s, New version: %s', (current_deployed_version, new_major_version)
|
||||
if int(new_major_version) > int(current_deployed_major_version):
|
||||
subprocess.check_call(['npm', 'version', '%s.0.0' % new_major_version])
|
||||
# subprocess.check_call(['npm', 'publish'])
|
||||
subprocess.check_call(['npm', 'whomai'])
|
||||
print 'Not pushing this time. Maybe next time?'
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user