File tree Expand file tree Collapse file tree 3 files changed +13
-15
lines changed Expand file tree Collapse file tree 3 files changed +13
-15
lines changed Original file line number Diff line number Diff line change 2727 "devDependencies" : {
2828 "@eslint/json" : " ^0.8.0" ,
2929 "@eslint/markdown" : " ^6.2.1" ,
30- "@stylistic/eslint-plugin-js" : " ^2.12 .0" ,
30+ "@stylistic/eslint-plugin-js" : " ^2.11 .0" ,
3131 "eslint" : " ^9.16.0" ,
3232 "eslint-plugin-yml" : " ^1.16.0" ,
3333 "husky" : " ^9.1.7"
Original file line number Diff line number Diff line change @@ -17,16 +17,13 @@ echo -e "${BY}\nBumping version in ${manifest}...${NC}\n"
1717TODAY=$( date +' %Y.%-m.%-d' ) # YYYY.M.D format
1818new_versions=() # for dynamic commit msg
1919old_ver=$( sed -n ' s/.*"version": *"\([0-9.]*\)".*/\1/p' " $manifest " )
20- if [[ $old_ver == " $TODAY " ]] # exact match for $TODAY
21- then # bump to $TODAY.1
22- NEW_VER=" $TODAY .1"
23- elif [[ $old_ver == " $TODAY ." * ]] # partial match for $TODAY
24- then # bump to $TODAY.n+1
25- last_number=$( echo " $old_ver " | awk -F ' .' ' {print $NF}' )
26- NEW_VER=" $TODAY .$(( last_number + 1 )) "
27- else # no match for $TODAY
28- # bump to $TODAY
29- NEW_VER=" $TODAY "
20+ if [[ $old_ver == " $TODAY " ]] ; then
21+ new_ver=" $TODAY .1"
22+ elif [[ $old_ver == " $TODAY ." * ]] ; then
23+ LAST_NUMBER=$( echo " $old_ver " | awk -F ' .' ' {print $NF}' )
24+ new_ver=" $TODAY .$(( LAST_NUMBER + 1 )) "
25+ else
26+ new_ver=" $TODAY "
3027fi
3128sed -i " s/\" version\" : \" $old_ver \" /\" version\" : \" $NEW_VER \" /" " $manifest "
3229echo -e " ${BW} v${old_ver}${NC} → ${BG} v${NEW_VER}${NC} "
You can’t perform that action at this time.
0 commit comments