Skip to content

Commit

Permalink
update-version script
Browse files Browse the repository at this point in the history
  • Loading branch information
eromano committed May 26, 2017
1 parent 9fe6f4b commit c6f6227
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ng2-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"@angular/router": "~4.0.0",
"@angular/compiler-cli": "~4.0.0",
"@angular/material": "2.0.0-beta.1",
"alfresco-js-api": "~1.4.0",
"alfresco-js-api": "~1.5.0",
"core-js": "2.4.1",
"dialog-polyfill": "0.4.7",
"element.scrollintoviewifneeded-polyfill": "1.0.1",
Expand All @@ -78,17 +78,17 @@
"rxjs": "5.0.0-beta.12",
"systemjs": "0.19.27",
"zone.js": "0.6.26",
"ng2-alfresco-core": "1.4.0",
"ng2-alfresco-core": "1.5.0",
"raphael": "2.2.7",
"chart.js": "2.5.0",
"md-date-time-picker": "2.2.0",
"moment": "2.15.1",
"ng2-activiti-diagrams": "1.4.0",
"ng2-activiti-diagrams": "1.5.0",
"ng2-charts": "1.5.0",
"ng2-activiti-form": "1.4.0",
"ng2-alfresco-datatable": "1.4.0",
"ng2-activiti-tasklist": "1.4.0",
"ng2-alfresco-documentlist": "1.4.0",
"ng2-activiti-form": "1.5.0",
"ng2-alfresco-datatable": "1.5.0",
"ng2-activiti-tasklist": "1.5.0",
"ng2-alfresco-documentlist": "1.5.0",
"pdfjs-dist": "1.5.404"
},
"devDependencies": {
Expand Down
28 changes: 28 additions & 0 deletions scripts/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,27 @@ update_component_dependency_version(){
done
}

update_total_build_dependency_version(){
DESTDIR="$DIR/../ng2-components/"

for (( j=0; j<${projectslength}; j++ ));
do
echo "====== UPDATE TOTAL BUILD DEPENDENCY VERSION of ${projects[$j]} to ~${VERSION} in ${1}======"
sed "${sedi[@]}" "s/\"${projects[$j]}\": \"[0-9]\\.[0-9]\\.[0-9]\"/\"${projects[$j]}\": \"${VERSION}\"/g" ${DESTDIR}/package.json
sed "${sedi[@]}" "s/\"${projects[$j]}\": \"~[0-9]\\.[0-9]\\.[0-9]\"/\"${projects[$j]}\": \"~${VERSION}\"/g" ${DESTDIR}/package.json
done
}

update_total_build_dependency_js_version(){
echo "====== UPDATE VERSION OF TOTAL BUILD to alfresco-js-api version ${VERSION} ======"
DESTDIR="$DIR/../ng2-components/"
PACKAGETOCHANGE="alfresco-js-api"

echo "====== UPDATE DEPENDENCY VERSION of ${1} to ~${VERSION} in ${DESTDIR}======"
sed "${sedi[@]}" "s/\"${PACKAGETOCHANGE}\": \"[0-9]\\.[0-9]\\.[0-9]\"/\"${PACKAGETOCHANGE}\": \"${VERSION}\"/g" ${DESTDIR}/package.json
sed "${sedi[@]}" "s/\"${PACKAGETOCHANGE}\": \"~[0-9]\\.[0-9]\\.[0-9]\"/\"${PACKAGETOCHANGE}\": \"~${VERSION}\"/g" ${DESTDIR}/package.json
}

update_component_js_version(){
echo "====== UPDATE DEPENDENCY VERSION of alfresco-js-api in ${1} to ${VERSION} ======"
DESTDIR="$DIR/../ng2-components/${1}"
Expand Down Expand Up @@ -164,5 +185,12 @@ if $JS_API == true; then
update_demo_shell_js_version
fi


echo "====== UPDATE TOTAL BUILD======"

update_total_build_dependency_version
update_total_build_dependency_js_version


DESTDIR="$DIR/../demo-shell-ng2/"
sed "${sedi[@]}" "s/\"version\": \"[0-9]\\.[0-9]\\.[0-9]\"/\"version\": \"${VERSION}\"/g" ${DIR}/../demo-shell-ng2/package.json

0 comments on commit c6f6227

Please sign in to comment.