This repository has been archived on 2023-02-02. You can view files and clone it, but cannot push or open issues or pull requests.
mfgames-locking-cil/scripts/set-build-version.sh
2021-01-21 18:02:19 -06:00

22 lines
402 B
Bash
Executable file

#!/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