-
deps.edn
{:aliases {:release {:extra-deps {com.github.toyokumo/tools.release {:git/tag "..." :git/sha "..."}} :ns-default toyokumo.tools.release}}}
-
Run task
clojure -X:release ${TASK_NAME} ${RELEASE_OPTION}
-
Create version file
-
Run
clojure -X:release init :version-file "/path/to/version.clj"
-
Edit
/path/to/version.clj
as you like.
-
-
Prepare the Makefile
VERSION_FILE := /path/to/version.clj RELEASE_OPTION := :version-file ${VERSION_FILE} pre-prod-deploy: clojure -X:release pre-prod-deploy ${RELEASE_OPTION} post-prod-deploy: clojure -X:release post-prod-deploy ${RELEASE_OPTION}
-
If you’d like to use branches other than
main
/develop
as your main/development branchs, please add the following toRELEASE_OPTION
.RELEASE_OPTION := :version-file ${VERSION_FILE} :main-branch master :develop-branch dev
-
-
Release!
make pre-prod-deploy # ... # Deploy application # ... make post-prod-deploy
Option name | Required | Description |
---|---|---|
|
Yes |
Path to the file which defines version string. |
|
No |
Default value is |
|
No |
Default value is |
|
No |
Default value is |
Task name | Description |
---|---|
init |
Generate a version file template in |
print-version |
Print the current version. |
bump-patch-version |
Bump the patch version in |
bump-minor-version |
Bump the minor version in |
bump-major-version |
Bump the major version in |
add-snapshot |
Add |
delete-snapshot |
Delete |
pre-prod-deploy |
Task before deploying to the production.
|
post-prod-deploy |
Task after deploying to the production.
|
Copyright 2021 Toyokumo,Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.