forked from LGouellec/streamiz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
update-version.sh
executable file
·31 lines (28 loc) · 1.28 KB
/
update-version.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
tags=("Version" "PackageVersion")
tagsAssembly=("AssemblyVersion" "FileVersion")
files=(
"core/Streamiz.Kafka.Net.csproj"
"metrics/Streamiz.Kafka.Net.Metrics.Prometheus/Streamiz.Kafka.Net.Metrics.Prometheus.csproj"
"metrics/Streamiz.Kafka.Net.Metrics.OpenTelemetry/Streamiz.Kafka.Net.Metrics.OpenTelemetry.csproj"
"serdes/Streamiz.Kafka.Net.SchemaRegistry.SerDes/Streamiz.Kafka.Net.SchemaRegistry.SerDes.csproj"
"serdes/Streamiz.Kafka.Net.SchemaRegistry.SerDes.Avro/Streamiz.Kafka.Net.SchemaRegistry.SerDes.Avro.csproj"
"serdes/Streamiz.Kafka.Net.SchemaRegistry.SerDes.Protobuf/Streamiz.Kafka.Net.SchemaRegistry.SerDes.Protobuf.csproj"
"serdes/Streamiz.Kafka.Net.SchemaRegistry.SerDes.Json/Streamiz.Kafka.Net.SchemaRegistry.SerDes.Json.csproj"
"serdes/Streamiz.Kafka.Net.SerDes.CloudEvents/Streamiz.Kafka.Net.SerDes.CloudEvents.csproj"
"test/Streamiz.Kafka.Net.Tests/Streamiz.Kafka.Net.Tests.csproj"
)
for tag in ${tags[@]}; do
for file in ${files[@]}; do
sed -i '' -e "s/<$tag>\(.*\)<\/$tag>/<$tag>$1<\/$tag>/g" $file
done
echo "$tag done"
done
for tag in ${tagsAssembly[@]}; do
for file in ${files[@]}; do
version=$1
newVersion="${version//-RC[0-9]*/}"
sed -i '' -e "s/<$tag>\(.*\)<\/$tag>/<$tag>$newVersion<\/$tag>/g" $file
done
echo "$tag done"
done