Variable for builds directory
This commit is contained in:
+10
-4
@@ -13,6 +13,11 @@ set -o errexit
|
|||||||
#
|
#
|
||||||
PROFILES="ol ol-debug"
|
PROFILES="ol ol-debug"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Destination directory for builds.
|
||||||
|
#
|
||||||
|
BUILDS=dist
|
||||||
|
|
||||||
#
|
#
|
||||||
# URL for canonical repo.
|
# URL for canonical repo.
|
||||||
#
|
#
|
||||||
@@ -35,7 +40,6 @@ display_usage() {
|
|||||||
The tag must be pushed to ${REMOTE} before the release can be published.
|
The tag must be pushed to ${REMOTE} before the release can be published.
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
exit 1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -62,8 +66,8 @@ assert_version_match() {
|
|||||||
#
|
#
|
||||||
build_profiles() {
|
build_profiles() {
|
||||||
for p in ${@}; do
|
for p in ${@}; do
|
||||||
echo building dist/${p}.js
|
echo building ${BUILDS}/${p}.js
|
||||||
node ./tasks/build.js config/${p}.json dist/${p}.js
|
node ./tasks/build.js config/${p}.json ${BUILDS}/${p}.js
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,19 +82,21 @@ checkout_tag() {
|
|||||||
|
|
||||||
#
|
#
|
||||||
# Build all profiles and publish.
|
# Build all profiles and publish.
|
||||||
|
#
|
||||||
main() {
|
main() {
|
||||||
root=$(cd -P -- "$(dirname -- "${0}")" && pwd -P)/..
|
root=$(cd -P -- "$(dirname -- "${0}")" && pwd -P)/..
|
||||||
cd ${root}
|
cd ${root}
|
||||||
assert_clean
|
assert_clean
|
||||||
checkout_tag ${1}
|
checkout_tag ${1}
|
||||||
assert_version_match ${1}
|
assert_version_match ${1}
|
||||||
rm -rf dist
|
rm -rf ${BUILDS}
|
||||||
build_profiles ${PROFILES}
|
build_profiles ${PROFILES}
|
||||||
npm publish
|
npm publish
|
||||||
}
|
}
|
||||||
|
|
||||||
if test ${#} -ne 1; then
|
if test ${#} -ne 1; then
|
||||||
display_usage ${0}
|
display_usage ${0}
|
||||||
|
exit 1
|
||||||
else
|
else
|
||||||
main ${1}
|
main ${1}
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user