new Travis configuration with automatic releases
This commit is contained in:
parent
80960fe9e7
commit
213c602f4e
24
.travis.yml
24
.travis.yml
@ -6,7 +6,7 @@ addons:
|
|||||||
paths:
|
paths:
|
||||||
- dist
|
- dist
|
||||||
target_paths:
|
target_paths:
|
||||||
- content/build/${TRAVIS_BRANCH}
|
- content/leaflet/${NAME}
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- ARTIFACTS_BUCKET=leafletjs-cdn
|
- ARTIFACTS_BUCKET=leafletjs-cdn
|
||||||
@ -19,5 +19,23 @@ env:
|
|||||||
XW1hzORAtSpTgTKkQwel5gRMDy6SotzeSRsVV2jQCn46VIMx8G/J5nOI+ImL
|
XW1hzORAtSpTgTKkQwel5gRMDy6SotzeSRsVV2jQCn46VIMx8G/J5nOI+ImL
|
||||||
yeoH12PhCR0h39dM7mq8TYJo5DHwvbotI5nQhpMruSt8eMFbym8nGiqQh806
|
yeoH12PhCR0h39dM7mq8TYJo5DHwvbotI5nQhpMruSt8eMFbym8nGiqQh806
|
||||||
fSJXkxmQ4MAjUdNFDIirBHhdZme8q3PueFzJ+5odFMvPGn/aITQ=
|
fSJXkxmQ4MAjUdNFDIirBHhdZme8q3PueFzJ+5odFMvPGn/aITQ=
|
||||||
after_success: >
|
after_success:
|
||||||
cd dist && zip -x .DS_Store -r leaflet.zip .
|
- npm run release
|
||||||
|
- 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
|
||||||
|
@ -1,31 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#make sure deps are up to date
|
|
||||||
rm -r node_modules
|
|
||||||
npm install
|
|
||||||
|
|
||||||
# get current version
|
|
||||||
VERSION=$(node --eval "console.log(require('./package.json').version);")
|
VERSION=$(node --eval "console.log(require('./package.json').version);")
|
||||||
# Build
|
|
||||||
git checkout -b build
|
|
||||||
npm test || exit 1
|
|
||||||
npm run prepublish
|
|
||||||
git add dist/leaflet-src.js dist/leaflet.js -f
|
|
||||||
|
|
||||||
# create the bower and component files
|
# # create build, zip, bower and component artifacts
|
||||||
copyfiles -u 1 build/*.json ./
|
npm run build
|
||||||
|
|
||||||
|
cd dist && zip -x .DS_Store -r leaflet.zip . && cd ..
|
||||||
|
|
||||||
|
# cp build/*.json ./
|
||||||
tin -v $VERSION
|
tin -v $VERSION
|
||||||
git add component.json bower.json -f
|
|
||||||
|
|
||||||
git commit -m "build $VERSION"
|
|
||||||
|
|
||||||
# Tag and push
|
|
||||||
echo git tag $VERSION
|
|
||||||
# git push --tags git@github.com:leaflet/leaflet.git $VERSION
|
|
||||||
|
|
||||||
# # # Publish JS modules
|
|
||||||
# npm publish
|
|
||||||
|
|
||||||
# # # Cleanup
|
|
||||||
# git checkout master
|
|
||||||
# git branch -D build
|
|
@ -25,8 +25,8 @@
|
|||||||
"style": "dist/leaflet.css",
|
"style": "dist/leaflet.css",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "jake test",
|
"test": "jake test",
|
||||||
"prepublish": "jake build",
|
"build": "jake build",
|
||||||
"publish": "./build/publish.sh"
|
"release": "./build/publish.sh"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
Loading…
Reference in New Issue
Block a user