This is an automated email from the git hooks/post-receive script. sebastic pushed a commit to branch master in repository mgrs.
commit c972a6c8bde02dfff39210bbd66036781f8e580e Author: Bas Couwenberg <sebas...@xs4all.nl> Date: Fri Aug 7 09:43:43 2015 +0200 Imported Upstream version 0.0.3 --- PUBLISHING.md | 17 +++++++++++++++++ dist/mgrs.js | 7 ++++--- publish.sh | 21 +++++++++++++++++++++ readme.md | 4 ++-- 4 files changed, 44 insertions(+), 5 deletions(-) diff --git a/PUBLISHING.md b/PUBLISHING.md new file mode 100644 index 0000000..2a74804 --- /dev/null +++ b/PUBLISHING.md @@ -0,0 +1,17 @@ +Publishing +=== + +Use `tin` to update the version number in `package.json`. + + tin -v x.y.z + +Then run the publish script + + ./publish.sh + +afterwards don't forget to update the versions to be a prerelease of the next version, so if you just published 1.1.1 then: + + tin -v 1.1.2-alpha + git add package.json + git commit -m 'update version to 1.1.2-alpha' + git push origin master diff --git a/dist/mgrs.js b/dist/mgrs.js index 2e1ada5..017f20c 100644 --- a/dist/mgrs.js +++ b/dist/mgrs.js @@ -38,7 +38,7 @@ var Z = 90; // Z * @param {object} ll Object literal with lat and lon properties on a * WGS84 ellipsoid. * @param {int} accuracy Accuracy in digits (5 for 1 m, 4 for 10 m, 3 for - * 100 m, 4 for 1000 m or 5 for 10000 m). Optional, default is 5. + * 100 m, 2 for 1000 m or 1 for 10000 m). Optional, default is 5. * @return {string} the MGRS string for the given location and accuracy. */ exports.forward = function(ll, accuracy) { @@ -360,8 +360,9 @@ function getLetterDesignator(lat) { * @return {string} MGRS string for the given UTM location. */ function encode(utm, accuracy) { - var seasting = "" + utm.easting, - snorthing = "" + utm.northing; + // prepend with leading zeroes + var seasting = "00000" + utm.easting, + snorthing = "00000" + utm.northing; return utm.zoneNumber + utm.zoneLetter + get100kID(utm.easting, utm.northing, utm.zoneNumber) + seasting.substr(seasting.length - 5, accuracy) + snorthing.substr(snorthing.length - 5, accuracy); } diff --git a/publish.sh b/publish.sh new file mode 100755 index 0000000..b96e6d0 --- /dev/null +++ b/publish.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# get current version +VERSION=$(npm ls --json=true mgrs | grep version | awk '{ print $2}'| sed -e 's/^"//' -e 's/"$//') + +# Build +git checkout -b build +npm run build +git add dist -f +git commit -m "build $VERSION" + +# Tag and push +git tag $VERSION +git push --tags g...@github.com:proj4js/mgrs.git $VERSION + +# Publish +npm publish + +# Cleanup +git checkout master +git branch -D build diff --git a/readme.md b/readme.md index f879495..1106c1f 100644 --- a/readme.md +++ b/readme.md @@ -34,11 +34,11 @@ npm run build ``` -Lisensed under the MIT linsense except: +Licensed under the MIT license except: Portions of this software are based on a port of components from the OpenMap com.bbn.openmap.proj.coords Java package. An initial port was initially created by Patrice G. Cappelaere and included in Community Mapbuilder (http://svn.codehaus.org/mapbuilder/), which is licensed under the LGPL license as per http://www.gnu.org/copyleft/lesser.html. OpenMap is licensed under the -[following license agreement](openmap.md): \ No newline at end of file +[following license agreement](openmap.md): -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/mgrs.git _______________________________________________ Pkg-grass-devel mailing list Pkg-grass-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel