You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

22 lines
655 B

  1. # Deploy `swagger-ui-dist` to npm.
  2. # Parameter Expansion: http://stackoverflow.com/questions/6393551/what-is-the-meaning-of-0-in-a-bash-script
  3. cd "${0%/*}"
  4. # Get UI version
  5. UI_VERSION=$(node -p "require('../package.json').version")
  6. # Replace our version placeholder with UI's version
  7. sed -i "s|\$\$VERSION|$UI_VERSION|g" package.json
  8. # Copy UI's dist files to our directory
  9. cp ../dist/* .
  10. if [ "$PUBLISH_DIST" = "true" ] || [ "$TRAVIS" = "true" ] ; then
  11. npm publish .
  12. else
  13. npm pack .
  14. fi
  15. find . -not -name .npmignore -not -name .npmrc -not -name deploy.sh -not -name index.js -not -name package.json -not -name README.md -not -name *.tgz -delete