Skip to content

Commit 3bcc012

Browse files
committed
gh-17 adding list and summary and prune function
Breaking: - option regex replaced with glob as was implemented as glob. regex might come later using grep as filter New features: - added: function "list" artifacts command with glob pattern - added: function "summary" using delimiter (default: /) . it finds all first fields and then counts number of artifacts given the pattern - added: function "prune". given a pattern find all artifacts and then keep the last amount given (default: 20). It is supporting --dryrun option Tests: - refactor tests to functions and enable single test case execution - it is still defaulting to * if not given - tests for new functions
1 parent ed82cc8 commit 3bcc012

5 files changed

Lines changed: 556 additions & 141 deletions

File tree

.test/7/git-reference.log

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
* (tag: v7.1) v7.1
2+
| * (tag: v2.0) v2.0
3+
|/
4+
| * (tag: v1.0) v1.0
5+
|/
6+
* (HEAD -> main, origin/main) First commit of git artifact
7+
v1.0
8+
v2.0
9+
v7.1
10+
Tags found: v*.* : 3

.test/8/git-reference.log

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
* (tag: test2/v8.7) test2/v8.7
2+
| * (tag: test2/v8.6) test2/v8.6
3+
|/
4+
| * (tag: test2/v8.5) test2/v8.5
5+
|/
6+
| * (tag: test2/v8.4) test2/v8.4
7+
|/
8+
| * (tag: test2/v8.3) test2/v8.3
9+
|/
10+
| * (tag: test2/v8.2) test2/v8.2
11+
|/
12+
| * (tag: test2/v8.1) test2/v8.1
13+
|/
14+
| * (tag: test1/v8.5) test1/v8.5
15+
|/
16+
| * (tag: test1/v8.4) test1/v8.4
17+
|/
18+
| * (tag: test1/v8.3) test1/v8.3
19+
|/
20+
| * (tag: test1/v8.2) test1/v8.2
21+
|/
22+
| * (tag: test1/v8.1) test1/v8.1
23+
|/
24+
| * (tag: v2.0) v2.0
25+
|/
26+
| * (tag: v1.0) v1.0
27+
|/
28+
* (HEAD -> main, origin/main) First commit of git artifact
29+
Summary of of amount of tags in using delimiter: / and filter on first column
30+
----------------------------------------------------------------------------------------
31+
v1.0 : 1
32+
test2 : 7
33+
test1 : 5
34+
v2.0 : 1

.test/9/git-reference.log

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
* (tag: v9.10) v9.10
2+
| * (tag: v9.9) v9.9
3+
|/
4+
| * (tag: v9.8) v9.8
5+
|/
6+
| * (tag: v9.7) v9.7
7+
|/
8+
| * (tag: v9.6) v9.6
9+
|/
10+
| * (tag: v9.5) v9.5
11+
|/
12+
| * (tag: v9.4) v9.4
13+
|/
14+
| * (tag: v9.3) v9.3
15+
|/
16+
| * (tag: v9.2) v9.2
17+
|/
18+
| * (tag: v9.1) v9.1
19+
|/
20+
| * (tag: v2.0) v2.0
21+
|/
22+
| * (tag: v1.0) v1.0
23+
|/
24+
* (HEAD -> main, origin/main) First commit of git artifact
25+
Amount of tags total: 12
26+
Amount of tags to be pruned: 7
27+
Amount of tags to be kept: 5
28+
Dry run - not executing prune command
29+
* (tag: v9.10) v9.10
30+
| * (tag: v9.9) v9.9
31+
|/
32+
| * (tag: v9.8) v9.8
33+
|/
34+
| * (tag: v9.7) v9.7
35+
|/
36+
| * (tag: v9.6) v9.6
37+
|/
38+
* (HEAD -> main, origin/main) First commit of git artifact
39+
v9.6
40+
v9.7
41+
v9.8
42+
v9.9
43+
v9.10
44+
Tags found: v*.* : 5

0 commit comments

Comments
 (0)