Comments (2)
If you open a PR, I'll accept it since I think it improves readability. It shouldn't be too hard to implement. I would name the command validate
, e.g. semver validate $version
. I wouldn't use stdout for transmitting success, simply exit 0 if it's valid, 1 otherwise.
On this subject, the example can be simplified. You don't need the set +e / set -e
guards and temporary variable, instead you can do the following:
if semver get major ${CURRENT_APP_VERSION} >/dev/null 2>&1; then
...
fi
The if
operator in bash will swallow the return code of the command without aborting the execution of the script due to set -e
.
from semver-tool.
I'll see if I have to make a PR over the holidays.
And thanks for the simplification of my bash snippet until we have the new command!
from semver-tool.
Related Issues (20)
- Portability: Function names containing hyphens HOT 2
- Inconsistent re-naming of "is-nat" HOT 1
- "bump prerel" should support numerical increments HOT 3
- travis-ci badge in README.md should be changed to a GitHub Action badge HOT 1
- "tag" badge in README.md file is inconsistent and confusing HOT 2
- atom/keyword returned by "diff" should match the atoms/keywords used by "bump" HOT 2
- "bats" test files are fragmented and inconsistent HOT 4
- Feature request HOT 7
- prerel compare issue HOT 4
- Create docs for installing on a travis agent HOT 3
- asdf plugin
- Request regarding "semver bump prerel" HOT 2
- README should factor out package manager installation notes HOT 5
- Is it expected, that prerel bump removes "v" prefix? HOT 2
- semver validate exit codes HOT 5
- Feature request: get '$major.$minor.*`
- Test dependencies obscure/confusing and not DRY HOT 5
- Dots are not allowed in prerelease identifiers HOT 2
- Support docker version with build number HOT 4
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 semver-tool.