This repository has been archived by the owner on Jan 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.balanced-parentheses.sexp
43 lines (37 loc) · 1.92 KB
/
.balanced-parentheses.sexp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
;;; -*- Mode: Lisp; Syntax: COMMON-LISP; Base: 10 -*-
(deftask prepare-release (:summary "Prepare to release a new version.")
(format t "working dir is ~a~%" (working-directory*))
(with-changes (:changes (changes-from-git))
(with-semantic-version (:current (highest-git-tag))
(setf (next-version*) (version-from-conventional-commits))
(write-changelog-file "CHANGELOG.rst"
(changelog-heading :rst)
(changelog-lines :rst :conventional-commits
:header-char "~"))
(write-version-sexp-file "sphinxcontrib/cldomain/version.lisp-expr")
;; TODO need to update the setup.cfg file with the version aswell
(write-file ".git/RELEASE_CHANGELOG"
(format nil "Release ~a~%~%" (next-version*))
(changelog-lines :markdown :conventional-commits)))))
(deftask build-release-artifacts (:summary "Build the release artifacts.")
(run-program '("python" "-m" "build")))
(deftask test-release-artifacts (:summary "Verify and test upload the artifacts.")
(run-program "twine check dist/*")
(run-program "twine upload -r testpypi dist/*"))
(deftask release-artifacts (:summary "Release the artifacts.")
(run-program "twine check dist/*")
(run-program "twine upload dist/*"))
(deftask release-new-version (:summary "Release a new version.")
(format t "working dir is ~a~%" (working-directory*))
(with-changes (:changes (changes-from-git))
(with-semantic-version (:current (highest-git-tag))
(setf (next-version*) (version-from-conventional-commits))
(let ((message (read-file ".git/RELEASE_CHANGELOG")))
(git-commit-changes
:message message
:author '(:name "Russell Sim"
:email "[email protected]"))
(git-create-tag
:message message
:author '(:name "Russell Sim"
:email "[email protected]"))))))