Updated release.sh to checkout branch 3.1.x of the cometd-javascript repository.
Publishing to NPM now restores the "latest" tag.
Removed update of the cometd-dojo repository - only the last version of CometD does.
@@ -39,7 +39,7 @@ fi
echo "Updating cometd-javascript repository"
COMETD_JS_DIR=${COMETD_DIR}/target/release/cometd-javascript
-git clone git@github.com:cometd/cometd-javascript.git ${COMETD_JS_DIR}
+git clone --branch 3.1.x git@github.com:cometd/cometd-javascript.git ${COMETD_JS_DIR}
COMETD_JS_SOURCE=${COMETD_DIR}/cometd-javascript/common/target/cometd-javascript-common-${VERSION}/js
cp -v ${COMETD_JS_SOURCE}/cometd/cometd.js ${COMETD_JS_DIR}
@@ -71,47 +71,8 @@ git commit -m "Release ${VERSION}."
git tag -am "Release ${VERSION}." ${VERSION}
git push --follow-tags
+LATEST="$(npm view cometd@latest version)"
if yes_no "Publish to NPM ? (Y/n)" y; then
npm publish
+ npm dist-tag add cometd@${LATEST} latest
fi
-
-echo "Updating cometd-dojo repository"
-COMETD_DOJO_DIR=${COMETD_DIR}/target/release/cometd-dojo
-DOJO_VERSION=$3
-
-git clone git@github.com:cometd/cometd-dojo.git ${COMETD_DOJO_DIR}
-
-COMETD_DOJO_SOURCE=${COMETD_DIR}/cometd-javascript/dojo/target/cometd-javascript-dojo-${VERSION}/js
-cp -v ${COMETD_DOJO_SOURCE}/cometd/cometd.js ${COMETD_DOJO_DIR}/org/
-cp -v ${COMETD_DOJO_SOURCE}/cometd/*Extension.js ${COMETD_DOJO_DIR}/org/cometd/
-cp -v ${COMETD_DOJO_SOURCE}/dojox/cometd.js ${COMETD_DOJO_DIR}
-cp -v ${COMETD_DOJO_SOURCE}/dojox/cometd/* ${COMETD_DOJO_DIR}/cometd
-
-cd ${COMETD_DOJO_DIR}
-
-cat <<EOF > ${COMETD_DOJO_DIR}/package.json
-{
- "name": "CometD",
- "version": "${VERSION}",
- "description": "Comet and WebSocket library for web messaging",
- "main": "cometd.js",
- "licenses": [{
- "type":"Apache License, Version 2.0",
- "url":"http://www.apache.org/licenses/LICENSE-2.0"
- }],
- "repository": {
- "type": "git",
- "url": "https://github.com/cometd/cometd-dojo.git"
- },
- "bugs": "https://bugs.cometd.org",
- "homepage": "https://cometd.org",
- "dependencies": {
- "dojo": "${DOJO_VERSION}"
- }
-}
-EOF
-
-git add .
-git commit -m "Release ${VERSION}."
-git tag -am "Release ${VERSION}." ${VERSION}
-git push --follow-tags
