2019-03-23 00:27:55 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
npm version --no-git-tag-version ${1}
|
|
|
|
|
|
|
|
#version all sub projects and config files
|
|
|
|
version=$(jq -r '.version' ./package.json)
|
|
|
|
echo "VERSION: $version"
|
|
|
|
|
2023-02-19 06:28:18 +00:00
|
|
|
git add ./package.json
|
2023-02-19 06:27:19 +00:00
|
|
|
|
2023-02-19 16:36:06 +00:00
|
|
|
declare -a fileArr=("./package-lock.json" "./data/cfg.json" "./app/package.json" "./app/package-lock.json" "./processing/mcopy/cfg.json")
|
2019-03-23 00:27:55 +00:00
|
|
|
|
|
|
|
for i in "${fileArr[@]}"
|
|
|
|
do
|
|
|
|
tmp=$(mktemp)
|
|
|
|
VERSION="$version" jq '.version = env.VERSION' "$i" > "$tmp" && mv "$tmp" "$i"
|
2023-02-19 06:27:19 +00:00
|
|
|
git add "$i"
|
2023-02-19 06:20:51 +00:00
|
|
|
done
|