Commit cb053f51 authored by Eric Timmons's avatar Eric Timmons
Browse files

use main as the default branch in version number computation

[skip ci]
parent 754a856a
Pipeline #4832 skipped
......@@ -51,11 +51,11 @@ NIL until an image is dumped and is set by ~cache-full-version~.")
:separator '(#\-)))
(defun get-git-common-ancestor ()
(clpm-git '("merge-base" "HEAD" "origin/master")
(clpm-git '("merge-base" "HEAD" "origin/main")
:output '(:string :stripped t)))
(defun get-git-distance-from-master ()
(parse-integer (clpm-git '("rev-list" "--count" "HEAD" "--not" "origin/master")
(defun get-git-distance-from-main ()
(parse-integer (clpm-git '("rev-list" "--count" "HEAD" "--not" "origin/main")
:output '(:string :stripped t))))
(defun get-git-tag ()
......@@ -85,7 +85,7 @@ NIL until an image is dumped and is set by ~cache-full-version~.")
(prerelease-category (cl-semver:version-pre-release-identifiers version)))
(unless prerelease-category
(setf prerelease-category '(0)))
(if (equal git-branch "master")
(if (equal git-branch "main")
(format nil "~{~A~^.~}-~{~A~^.~}.~A+~A~:[~;-dirty~]"
primary-version
prerelease-category
......@@ -94,12 +94,12 @@ NIL until an image is dumped and is set by ~cache-full-version~.")
git-dirty-p)
(let* ((ancestor (get-git-common-ancestor))
(ancestor-describe (get-git-describe ancestor))
(distance-from-master (get-git-distance-from-master)))
(distance-from-main (get-git-distance-from-main)))
(format nil "~{~A~^.~}-~{~A~^.~}.~A.0.~A.~A+~A~:[~;-dirty~]"
primary-version prerelease-category
(second ancestor-describe)
git-branch
distance-from-master
distance-from-main
(third git-describe)
git-dirty-p)))))))
;; We don't have git... Best we can currently do is return the base
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment