come back to the old publishing approach with improvements

This commit is contained in:
Vladimir Agafonkin 2015-10-14 18:29:48 +03:00
parent d9917fa240
commit 857848fbee
3 changed files with 24 additions and 23 deletions

View File

@ -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'

View File

@ -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 test || exit 1
git checkout -b build
npm run build
git add dist/leaflet-src.js dist/leaflet.js dist/leaflet-src.map -f
cd dist && zip -x .DS_Store -r leaflet.zip . && cd ..
# 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

View File

@ -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",