Browse Source

add version numbers back to child building script

Ben Dwyer 4 years ago
parent
commit
a312ee32b8
1 changed files with 2 additions and 0 deletions
  1. 2 0
      varia/rebuild-child-themes.sh

+ 2 - 0
varia/rebuild-child-themes.sh

@@ -5,6 +5,8 @@ declare -a ChildThemes=("alves" "balasana" "barnsbury" "brompton" "coutoire" "da
 for child in ${ChildThemes[@]}; do
 for child in ${ChildThemes[@]}; do
 	cd '../'${child}
 	cd '../'${child}
 	echo 'Rebulding '${child}
 	echo 'Rebulding '${child}
+	perl -pi -e 's/Version: ((\d+\.)*)(\d+)(.*)$/"Version: ".$1.($3+1).$4/ge' sass/style-child-theme.scss
+	perl -pi -e 's/\"version\": \"((\d+\.)*)(\d+)\"(.*)$/"\"version\": \"".$1.($3+1)."\"".$4/ge' package.json
 	npm install
 	npm install
 	npm run build
 	npm run build
 done
 done