File tree Expand file tree Collapse file tree 3 files changed +37
-1
lines changed Expand file tree Collapse file tree 3 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -24,4 +24,10 @@ all: buf-lint buf-build test
24
24
install :
25
25
npm i
26
26
rm -rf proto/google || true
27
- cp -r node_modules/protobufjs/google proto/google
27
+ cp -r node_modules/protobufjs/google proto/google
28
+
29
+ list-components-ids :
30
+ @bash scripts/list-components-ids.sh
31
+
32
+ check-component-id :
33
+ @bash scripts/check-component-id.sh $(ID )
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ if [ -z " $1 " ]; then
4
+ echo " Usage: make check-component-id ID=<id>"
5
+ exit 1
6
+ fi
7
+
8
+ id=$1
9
+
10
+ matches=$( find . -name " *.proto" -exec grep -l " option (common\.ecs_component_id) = $id ;" {} +)
11
+
12
+ if [ -z " $matches " ]; then
13
+ echo " id $id is free"
14
+ else
15
+ echo " id $id is taken"
16
+ fi
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ ids=$( find . -name " *.proto" -exec grep -ho ' option (common\.ecs_component_id) = [0-9]\+;' {} + | sed -E ' s/.*= ([0-9]+);/\1/' | sort -n)
4
+
5
+ count=$( echo " $ids " | wc -l | xargs)
6
+
7
+ echo " List of ids ($count total):"
8
+
9
+ i=1
10
+ echo " $ids " | while read id; do
11
+ echo " $i . $id "
12
+ (( i++ ))
13
+ done
14
+
You can’t perform that action at this time.
0 commit comments