Skip to content
This repository has been archived by the owner on Jun 20, 2018. It is now read-only.

Commit

Permalink
COMMIT TO DELETE: publishing wip packages
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitf committed May 7, 2018
1 parent fdd626c commit 7a8bed6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ before_script:
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.6.0
- export PATH=$HOME/.yarn/bin:$PATH ;
- export THEIA_HOME=$(pwd)
- export PATH=${THEIA_HOME}/node_modules/.bin:${PATH}
- cd ${THEIA_HOME}/ && rm ./dev-packages/application-package/src/extension-package.spec.ts && cp ./dev-packages/application-manager/src/package.spec.ts ./dev-packages/application-package/src/extension-package.spec.ts
- cd ${THEIA_HOME}/ && rm ./packages/metrics/src/node/prometheus.spec.ts && cp ./dev-packages/application-manager/src/package.spec.ts ./packages/metrics/src/node/prometheus.spec.ts
- cd ${THEIA_HOME}/ && rm ./packages/extension-manager/src/node/*spec.ts && cp ./dev-packages/application-manager/src/package.spec.ts ./packages/extension-manager/src/node/extension.spec.ts
- cd ${THEIA_HOME}/ && find . -name "*.*" -type f -not -path "*node_modules/*" -exec sed -i 's/\@theia\//\@wiptheia\//g' {} \;
install: yarn
script: travis_retry yarn test:theia ;
jobs:
Expand All @@ -86,14 +92,12 @@ jobs:
install: skip
before_deploy:
- printf "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}\n" >> ~/.npmrc
- export THEIA_PUBLISHED_VERSION="0.3.10-$(date +%s)"
- yarn build
- export THEIA_HOME=$(pwd)
- export PATH=${THEIA_HOME}/node_modules/.bin:${PATH}
- cd ${THEIA_HOME}/packages/plugin && find . -name "*.*" -type f -not -path "*node_modules/*" -exec sed -i 's/\@theia\/plugin/\@wiptheia\/plugin/g' {} \;
- cd ${THEIA_HOME}/packages/plugin && npm version -no-git-tag-version "0.3.10-$(date +%s)"
- cd ${THEIA_HOME} && for f in $(find . -name "package.json" -type f -not -path "*node_modules/*"); do cd ${THEIA_HOME}/$(dirname $f) && npm version -no-git-tag-version ${THEIA_PUBLISHED_VERSION}; done; cd ${THEIA_HOME}
deploy:
provider: script
script: cd ${THEIA_HOME}/packages/plugin && npm publish --access public
script: bash ${THEIA_HOME}/scripts/publish-theia.sh ${THEIA_HOME}
on:
branch: master
skip_cleanup: true
19 changes: 19 additions & 0 deletions scripts/publish-theia.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh

export THEIA_HOME=$1
echo "Deploying to NPM... using THEIA directory $1"

cd ${THEIA_HOME}/dev-packages
for f in $(find . -name "package.json" -type f -not -path "*node_modules/*"); do
cd ${THEIA_HOME}/dev-packages/$(dirname $f);
echo "publishing from $(pwd) the command publish....";
npm publish --access public;
done;

cd ${THEIA_HOME}/packages
for f in $(find . -name "package.json" -type f -not -path "*node_modules/*"); do
cd ${THEIA_HOME}/packages/$(dirname $f);
echo "publishing from $(pwd) the command publish....";
npm publish --access public;
done;

0 comments on commit 7a8bed6

Please sign in to comment.