bd957ad32f
* Have uglifyjs spit out a sourcemap for leaflet.js too. Fixes #5341 * Fix incorrect source map file when publishing a release and add the new one too.
36 lines
655 B
Bash
Executable File
36 lines
655 B
Bash
Executable File
#!/bin/bash
|
|
|
|
npm update
|
|
|
|
VERSION=$(node --eval "console.log(require('./package.json').version);")
|
|
|
|
npm test || exit 1
|
|
|
|
echo "Ready to publish Leaflet version $VERSION."
|
|
echo "Has the version number been bumped?"
|
|
read -n1 -r -p "Press Ctrl+C to cancel, or any other key to continue." key
|
|
|
|
git checkout -b build
|
|
|
|
export NODE_ENV=release
|
|
|
|
npm run-script build
|
|
|
|
echo "Creating git tag v$VERSION..."
|
|
|
|
git add dist/leaflet-src.js dist/leaflet.js dist/leaflet-src.js.map dist/leaflet.js.map -f
|
|
|
|
git commit -m "v$VERSION"
|
|
|
|
git tag v$VERSION -f
|
|
git push --tags -f
|
|
|
|
echo "Uploading to NPM..."
|
|
|
|
npm publish
|
|
|
|
git checkout master
|
|
git branch -D build
|
|
|
|
echo "All done."
|