Comments (4)
So instead of adding a -
(dash) when bump your package.json version we used a +
(plus sign)
from jitsu.
REEDITED FOR CLARITY:
Not quite. Nodejitsu/jitsu still does that dash (-
) numerical bump for backward compatibility... but we'd eventually like to send the commit hash (7 digit or full sha1sum) along with it to the nodejitsu backend with our project... then nodejitsu does whatever with it... e.g. perhaps append a custom name/value pairing to a nodejitsu specific portion of the package.json
e.g. pass some names/values through... or even setting a custom environment variable... or just flat passing it through along with the dash bump that happens (0.0.0+sha1.12abc67
becomes 0.0.0-1+sha1.12abc67
) ... so we can read one of these in programmatically. Then the issue with the -r
could be resolved too since the backend has been ignoring that now from an issue I have with support.
Build metadata MAY be denoted by appending a plus sign and a series of dot separated identifiers immediately following the patch or pre-release version. Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty. Build metadata SHOULD be ignored when determining version precedence. Thus two versions that differ only in the build metadata, have the same precedence. Examples: 1.0.0-alpha+001, 1.0.0+20130313144700, 1.0.0-beta+exp.sha.5114f85.
The bolded section is just about exactly what we are looking for from the semver docs... but the backend of jitsu e.g. nodejitsu would need to do something useful with it and jitsu would pass it through with -r
or some other new switch.
Here's one of the possible examples to think about:
Sample project package.json
that we do:
{
"name": "Project",
"description": "Projection description",
"version": "0.0.0",
"main": "index",
"licenses": [
{
"type": "GPL-3.0+",
"url": "http://www.gnu.org/copyleft/gpl.html"
}
],
"subdomain": "somedomain",
"domains": [
"somedomain.org"
],
"scripts": {
"start": "node index.js"
},
"engines": {
"node": ">=0.10.33"
}
}
We do a shell script along with a fictitious switch as of right now of:
#!/bin/bash
# Pretend this next line returns `12abc67`
HEAD=`git rev-parse --short HEAD`
# This next line would return `0.0.0`
VER=`node -p 'JSON.parse(process.argv[1]).version' "$(cat package.json)"`
# The `-r` switch could validate numeric.numeric.numeric
# The `-b` switch could validate ASCII alphanumerics and hyphen [0-9A-Za-z-],
# with the period `.` which can optionally mean whatever in the backend of Nodejitsu
jitsu deploy -c -r $VER -b $HEAD
Nodejitsu creates the snapshot with this package.json
:
{
"name": "Project",
"description": "Projection description",
"version": "0.0.0-1+12abc67",
"main": "index",
"licenses": [
{
"type": "GPL-3.0+",
"url": "http://www.gnu.org/copyleft/gpl.html"
}
],
"subdomain": "somedomain",
"domains": [
"somedomain.org"
],
"scripts": {
"start": "node index.js"
},
"engines": {
"node": ">=0.10.33"
}
}
All of this could keep semver happy, nodejitsu and quite possibly more than just one customer too.
from jitsu.
Do my huge, multiple, revisions above make more sense?
from jitsu.
bump
Any progress of restoring the build metadata (e.g. everything including and after the +
symbol) to the a projects package.json
with $ jitsu deploy
?? TIA
from jitsu.
Related Issues (20)
- Error when deploying HOT 2
- Feedback when streaming build logs are done
- Deployment exception HOT 2
- Read environment variables locally and set in app
- Save time by allowing domain and name parameters in jitsu deploy command HOT 2
- Build errors not properly displayed
- Cannot deploy applications with make files HOT 1
- Option to avoid writing to package.json HOT 1
- Allow optional delay to watch for immediate errors on deploy HOT 3
- Warn on wrong engine version HOT 5
- Jitsu throws err HOT 3
- When creating a package.json on jitsu deploy, jitsu skips analysing dependencies if entering details when prompted for 'scripts.start'
- Doesn't work behind a firewall with http proxy setup
- npm version and GH version out of sync HOT 1
- Update of *jitsu* docs and implementation needed
- Authentication error is not displayed HOT 1
- Cannot update jitsu and unable to deploy app HOT 6
- jitsu deploy doesn't work HOT 3
- Nodejitsu Error 500
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jitsu.