-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathupdate-version.sh
More file actions
executable file
·44 lines (34 loc) · 1.25 KB
/
update-version.sh
File metadata and controls
executable file
·44 lines (34 loc) · 1.25 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
echo "Updating the version to $1 for files in $PWD"
newVersion=$1
for pluginXmlFile in $( find ../. -name "plugin.xml" ); do
echo "Editing file: $pluginXmlFile $newVersion"
cmd="ed -s $pluginXmlFile <<< $'H\n,s/<version>_PLACEHOLDER_<\/version>/<version>$newVersion<\/version>/g\nw'"
echo $cmd
eval $cmd
done
for pluginXmlFile in $( find ../. -name "gradle.properties" ); do
echo "Editing file: $pluginXmlFile $newVersion"
cmd="ed -s $pluginXmlFile <<< $'H\n,s/PluginVersion=_PLACEHOLDER_/PluginVersion=$newVersion/g\nw'"
echo $cmd
eval $cmd
done
for pluginXmlFile in $( find ../. -name "*.csproj" ); do
echo "Editing file: $pluginXmlFile $newVersion"
cmd="ed -s $pluginXmlFile <<< $'H\n,s/<PackageVersion>1.0.1</<PackageVersion>$newVersion</g\nw'"
echo $cmd
eval $cmd
done
for pluginXmlFile in $( find ../. -name "*.csproj" ); do
echo "Editing file: $pluginXmlFile $newVersion"
cmd="ed -s $pluginXmlFile <<< $'H\n,s/<AssemblyVersion>1.0.1</<AssemblyVersion>$newVersion</g\nw'"
echo $cmd
eval $cmd
done
for pluginXmlFile in $( find ../. -name "*.csproj" ); do
echo "Editing file: $pluginXmlFile $newVersion"
cmd="ed -s $pluginXmlFile <<< $'H\n,s/<FileVersion>1.0.1</<FileVersion>$newVersion</g\nw'"
echo $cmd
eval $cmd
done
exit 0