mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-10 13:26:09 +02:00
Improve version strings.
Have the abbreviated git hash appear in the version string when not using a released version of pgloader.
This commit is contained in:
parent
fecae2c2d9
commit
f34017d023
19
README.md
19
README.md
@ -30,6 +30,25 @@ The versioning is now following the Emacs model, where any X.0 release
|
||||
number means you're using a development version (alpha, beta, or release
|
||||
candidate). The next stable versions are going to be `3.1` then `3.2` etc.
|
||||
|
||||
When using a development snapshot rather than a released version the version
|
||||
number includes the git hash (in its abbreviated form):
|
||||
|
||||
- `pgloader version "3.0.99"`
|
||||
|
||||
Release candidate 9 for pgloader version 3.1, with a *git tag* named
|
||||
`v3.0.99` so that it's easy to checkout the same sources as the
|
||||
released code.
|
||||
|
||||
- `pgloader version "3.0.fecae2c"`
|
||||
|
||||
Development snapshot again *git hash* `fecae2c`. It's possible to have
|
||||
the same sources on another setup with using the git command `git
|
||||
checkout fecae2c`.
|
||||
|
||||
- `pgloader version "3.1.0"`
|
||||
|
||||
Stable release.
|
||||
|
||||
## INSTALL
|
||||
|
||||
pgloader is now a Common Lisp program, tested using the
|
||||
|
||||
@ -32,7 +32,24 @@
|
||||
|
||||
(in-package :pgloader.params)
|
||||
|
||||
(defparameter *version-string* "3.0.99"
|
||||
(defparameter *release* nil
|
||||
"non-nil when this build is a release build.")
|
||||
|
||||
(defparameter *major-version* "3.0")
|
||||
(defparameter *minor-version* "99")
|
||||
|
||||
(defun git-hash ()
|
||||
"Return the current abbreviated git hash of the development tree."
|
||||
(let ((git-hash `("git" "--no-pager" "log" "-n1" "--format=format:%h")))
|
||||
(uiop:with-current-directory ((asdf:system-source-directory :pgloader))
|
||||
(multiple-value-bind (stdout stderr code)
|
||||
(uiop:run-program git-hash :output :string)
|
||||
(declare (ignore code stderr))
|
||||
stdout))))
|
||||
|
||||
(defparameter *version-string*
|
||||
(concatenate 'string *major-version* "."
|
||||
(if *release* *minor-version* (git-hash)))
|
||||
"pgloader version strings, following Emacs versionning model.")
|
||||
|
||||
;; we can't use pgloader.utils:make-pgstate yet because params is compiled
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user