Skip to content

Commit d240742

Browse files
authored
docs: new package magic-version (#57)
1 parent 410d546 commit d240742

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

_posts/2021-08-14-magic-version.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
layout: post
3+
title: "magic-version"
4+
description: "calculate version from CI env"
5+
category: ci
6+
tags: [coding, github, ci, jenkins]
7+
---
8+
9+
calculate version for CI (CODING, GitHub Actions, Jenkins)
10+
11+
when | version
12+
-------|---------
13+
tag | 1.2.0
14+
branch | main-3a11e12
15+
MR | mr-123-3a11e12
16+
PR(GitHub) | pr-123-3a11e12
17+
18+
```bash
19+
bpkg install [-g] sinkcup/magic-version
20+
```
21+
22+
## Usage
23+
24+
```bash
25+
export TAG_NAME=1.2.0
26+
magic-version
27+
```
28+
29+
> 1.2.0
30+
31+
more examples in [test code](https://github.com/sinkcup/magic-version/tree/main/test)
32+
33+
## Links
34+
35+
* [Source Code](https://github.com/sinkcup/magic-version)
36+
* [Author: sink](https://github.com/sinkcup)
37+

0 commit comments

Comments
 (0)