22 lines
402 B
Bash
22 lines
402 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
# This sets the build version using a `Directory.Build.props` at the top-level
|
||
|
# of the project.
|
||
|
|
||
|
# Move into the root directory.
|
||
|
cd $(dirname $0)
|
||
|
cd ..
|
||
|
|
||
|
# Get the version from `package.json`.
|
||
|
VERSION=$(grep '"version":' package.json | cut -f 4 -d '"')
|
||
|
|
||
|
cat > src/Directory.Build.props << EOL
|
||
|
<Project>
|
||
|
|
||
|
<PropertyGroup>
|
||
|
<Version>$VERSION</Version>
|
||
|
</PropertyGroup>
|
||
|
|
||
|
</Project>
|
||
|
EOL
|