Comments (6)
@virgilwashere you might just do this with the new version:
wget $(lastversion --pre --assets mautic/mautic)
Then it downloads both :)
file *.zip
2.15.2-beta-update.zip: Zip archive data, at least v2.0 to extract
2.15.2-beta.zip: Zip archive data, at least v2.0 to extract
I see it somewhat useful now, for repos which for instance having md5 checksums in separate files.
from lastversion.
Good suggestions. I will implement them (some with lower priority though, because at least for me the main target is getting the last stable version and only that).
The default behavior is to just fetch HTML of releases page and parse that. Only if nothing is found there, the API call is attempted. The --nosniff
option will directly use only in the GitHub API being used (no parsing), so it's more like a showcase how default GitHub API isn't working as expected.
from lastversion.
Thank you!
In combination with these shell functions, lastversion
will simplify updating prerequisites for deployments!!
version_lte() { printf '%s\n%s' "${1}" "${2}" | $( command -v sort) -C -V; }
version_lt() { ! version_lte "${2}" "${1}"; }
Virgil
from lastversion.
--self
would still be nice to have.
--self show the latest version of 'lastversion'
Or maybe --verbose --version
actually checks github releases for dvershinin/lastversion
???
Thanks for 0.1.0
release!
from lastversion.
@virgilwashere I didn't (at least yet) add the --self
because it makes parsing options code complex (for me : ) .
I'm using similar bash function in my scripts:
function version_gt() {
test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1";
}
It occurred to me now that it might be useful to integrate version comparison into lastversion
itself. As in maybe like this:
CURRENTLY_BUILT_VER=1.2.3 # stored somewhere, e.g. spec file in my case
LASTVER=$(lastversion repo/owner --newer-than $CURRENTLY_BUILT_VER)
if [ $? -eq 0 ]; then
# LASTVER is newer, update and trigger build
....
With exit status 1
for version lookup failure and 2
for comparison failure if required to distinguish them.
from lastversion.
Got the self
working as special value of repository argument, so it's not flag, e.g.
lastversion self
Another addition is being able to lookup by a single word (search API does not allow for good caching at all, so careful with rate limits), but it's quite fun seeing this work:
lastversion linux # > 5.2
lastversion linux --pre # > 5.3rc2
lastversion ngx_pagespeed # > 1.13.35.2 works even though argument does not match repo name, which is incubator-pagespeed-ngx
Or this, to check if you use latest Linux kernel:
NEWER_KERNEL=$(lastversion linux -gt $(uname -r | cut -d '-' -f 1))
if [ $? -eq 0 ]; then
echo "I better update my kernel now, because ${KERNEL} is there"
else
echo "My kernel is latest and greatest."
fi
from lastversion.
Related Issues (20)
- Wrong version parsing with number in name HOT 2
- Installation of AppImage failed HOT 5
- verify flag for sessions HOT 3
- Bump up the cachecontrol pacakge HOT 1
- The AppImage is downloaded, but os.chmod fails HOT 4
- Does not differntiate between tags and releases on github repos HOT 2
- lastversion does not correctly fetch a version from github releases HOT 2
- lastversion (sometimes) does not correctly fetch a version from github releases HOT 2
- xyproto/yaloco
- Exclude not working as expected HOT 3
- For PowerShell repo, `preview` gets confused with `rc` HOT 2
- Webcord failing to install on Fedora 37 aarch64 HOT 8
- Feature: Could we get release date of the latest version on command line HOT 5
- Web API: /hooks/github is not implemented
- Wrong version of cadvisor HOT 2
- Wrong version of n8n HOT 5
- CRITICAL: API request was denied despite using an API token. Missing scopes? HOT 5
- [GitLab] CRITICAL - No release was found HOT 8
- [GitLab] Last version and tag missmatch HOT 1
- [GitLab] lastversion reports old version HOT 1
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 lastversion.