#!/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 $VERSION EOL