Skip to content

Commit bc60e38

Browse files
committed
commit-o-matic: add function to mark new packages
1 parent 6f36821 commit bc60e38

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

Diff for: commit-o-matic/README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ commit-o-matic
44
A simple script that commit and add new version message for you.
55

66
```
7-
Useage:
7+
Usage:
88
9-
commit-o-matic PACKAGE_GROUPS
10-
11-
- PACKAGE_GROUPS: Path to the list of packages. (Example: TREE/groups/plasma)
9+
commit-o-matic PACKAGE_GROUP TYPE [MESSAGE]
1210
11+
- PACKAGE_GROUP: Path to the list of packages to be committed.
12+
(Example: TREE/groups/plasma)
13+
- TYPE: type of the desired operation (new, update, or bump-rel)
14+
- [MESSAGE]: if TYPE=bump-rel, you need to specify why. Input reason here.
1315
```
1416

1517
> No Buckling Spring Keyboards Were Harmed in the Making of This Script.

Diff for: commit-o-matic/commit-o-matic.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
22
_help_message() {
33
printf "\
4-
Useage:
4+
Usage:
55
66
commit-o-matic PACKAGE_GROUP TYPE [MESSAGE]
77
88
- PACKAGE_GROUP: Path to the list of packages to be committed.
99
(Example: TREE/groups/plasma)
10-
- TYPE: type of the desired operation (update or bump-rel)
10+
- TYPE: type of the desired operation (new, update, or bump-rel)
1111
- [MESSAGE]: if TYPE=bump-rel, you need to specify why. Input reason here.
1212
1313
"
@@ -36,6 +36,11 @@ if [[ $2 == "update" ]]; then
3636
git add --all $i
3737
git commit -m "${i##*/}: update to $(grep "VER=" $i/spec | cut -d "=" -f2)"
3838
done
39+
elif [[ $2 == "new" ]]; then
40+
for i in $(cat $1); do
41+
git add --all $i
42+
git commit -m "${i##*/}: new, $(grep "VER=" $i/spec | cut -d "=" -f2)"
43+
done
3944
elif [[ $2 == "bump-rel" ]]; then
4045
if [ -z "$3" ]; then
4146
echo -e "[!!!] Need a reason for revision."

0 commit comments

Comments
 (0)