Skip to content

Commit

Permalink
come back to the old publishing approach with improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner committed Oct 14, 2015
1 parent d9917fa commit 857848f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 23 deletions.
22 changes: 4 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,8 @@ env:
yeoH12PhCR0h39dM7mq8TYJo5DHwvbotI5nQhpMruSt8eMFbym8nGiqQh806
fSJXkxmQ4MAjUdNFDIirBHhdZme8q3PueFzJ+5odFMvPGn/aITQ=
after_success:
- npm run release
- npm run build
- cd dist && zip -x .DS_Store -r leaflet.zip . && cd ..
- NAME=$TRAVIS_BRANCH
- "[[ $TRAVIS_PULL_REQUEST != 'false' ]] && NAME=$TRAVIS_PULL_REQUEST"
- "[[ -n $TRAVIS_TAG ]] && NAME=$TRAVIS_TAG"
deploy:
provider: releases
api_key:
secure: JrqxB0Ed8TO2Aoy3Rcp7JS3O799b7qDKEYvdekEgCVmUyRa9Gd4/cSpDbUdlTSnlBS42pqIImar9V5tTT1A6ygcDZBKJnAdfUGCNxz5JDiVqd8HwHbqA2/m/jEUt34+i5yzVLZo4RR7Zvyiq0wPSBBvP9EvphBhrx6vHlb0M2Vg=
file:
- "dist/leaflet.js"
- "dist/leaflet-src.js"
- "bower.json"
- "component.json"
skip_cleanup: true
on:
tags: true
repo: Leaflet/Leaflet
after_deploy:
- npm publish --tag beta
- '[[ $TRAVIS_PULL_REQUEST != ''false'' ]] && NAME=$TRAVIS_PULL_REQUEST'
- '[[ -n $TRAVIS_TAG ]] && NAME=$TRAVIS_TAG'
23 changes: 19 additions & 4 deletions build/publish.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
#!/bin/bash

npm update

VERSION=$(node --eval "console.log(require('./package.json').version);")

# # create build, zip, bower and component artifacts
npm run build
npm test || exit 1

cd dist && zip -x .DS_Store -r leaflet.zip . && cd ..
git checkout -b build

npm run build
git add dist/leaflet-src.js dist/leaflet.js dist/leaflet-src.map -f

# cp build/*.json ./
copyfiles -u 1 build/*.json ./
tin -v $VERSION
git add component.json bower.json -f

git commit -m "v$VERSION"

git tag v$VERSION -f
git push --tags -f

npm publish --tag beta

git checkout master
git branch -D build
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "leaflet",
"version": "1.0.0-beta.2",
"version": "1.0.0-beta.2.rc.2",
"description": "JavaScript library for mobile-friendly interactive maps",
"devDependencies": {
"copyfiles": "0.2.1",
Expand Down

0 comments on commit 857848f

Please sign in to comment.