Skip to content

Conversation

calvinmetcalf
Copy link
Contributor

as discussed in #1903

npm install

# get current version
VERSION=$(npm ls --json=true pouchdb | grep version | awk '{ print $2}'| sed -e 's/^"//' -e 's/"$//')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pouchdb referenced

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woops, This whole line is probably not platform independent and could
probably be replaced with

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

Or whatever the exact line command is
On Mar 19, 2014 4:12 PM, "Vladimir Agafonkin" notifications@github.com
wrote:

In build/publish.sh:

@@ -0,0 +1,32 @@
+#!/bin/bash
+
+#make sure deps are up to date
+rm -r node_modules
+npm install
+
+# get current version
+VERSION=$(npm ls --json=true pouchdb | grep version | awk '{ print $2}'| sed -e 's/^"//' -e 's/"$//')

pouchdb referenced

Reply to this email directly or view it on GitHubhttps://github.com//pull/2561/files#r10769127
.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could just do

require('./src/Leaflet.js').version

Like in Jakefile.js

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That too
On Mar 19, 2014 5:09 PM, "Vladimir Agafonkin" notifications@github.com
wrote:

In build/publish.sh:

@@ -0,0 +1,32 @@
+#!/bin/bash
+
+#make sure deps are up to date
+rm -r node_modules
+npm install
+
+# get current version
+VERSION=$(npm ls --json=true pouchdb | grep version | awk '{ print $2}'| sed -e 's/^"//' -e 's/"$//')

You could just do

require('./src/Leaflet.js').version

Like in Jakefile.js

Reply to this email directly or view it on GitHubhttps://github.com//pull/2561/files#r10771715
.

@mourner mourner added this to the 1.0-beta milestone Mar 19, 2014
@calvinmetcalf
Copy link
Contributor Author

ok fixed it to abort if the tests failed, also src/Leaflet.js has invalid semvar (0.8-dev) so had it get the version from the package.json which has valid semver.

mourner added a commit that referenced this pull request Mar 26, 2014
add publish script for component and bower
@mourner mourner merged commit a356bcb into Leaflet:master Mar 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants