Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: bump thirdparty dependencies during upgrade #1325

Merged
merged 3 commits into from
Feb 10, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions build/upgrade_highlightjs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ build_custom_highlightjs() {
(cd ${HIGHLIGHTJS_SRC_DIR} && yarn install --frozen-lockfile && node tools/build -t browser ${HIGHLIGHTJS_LANGUAGES}) || return 1
}

bump_highlightjs_version() {
echo "-----------------------------------------------------------------------------------"
echo "Bumping highlightjs version in package.json thirdparty-dependencies"
echo "-----------------------------------------------------------------------------------"
HIGHLIGHTJS_VERSION=$(cd ${HIGHLIGHTJS_SRC_DIR} && ../build/current_version.sh) || return 1

echo "Bumping highlightjs version to ${HIGHLIGHTJS_VERSION}"
sed -i '' "s/\(\"highlightjs\": \)\".*\"/\1\"${HIGHLIGHTJS_VERSION}\"/g" package.json
}

cleanup_custom_highlightjs() {
echo "-----------------------------------------------------------------------------------"
echo "Cleaning up highlightjs repo"
Expand Down Expand Up @@ -69,6 +79,9 @@ upgrade_highlightjs() {
# Copy over built assets to target directory
process_highlightjs_assets || return 1

# Bump highlightjs version in package.json thirdparty-dependencies
bump_highlightjs_version || return 1

# Cleanup highlightjs
cleanup_custom_highlightjs || return 1

Expand Down
8 changes: 8 additions & 0 deletions build/upgrade_pdfjs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ echo "--------------------------------------------------------------------------
rm -rf ./pdfjs-dist/
git clone https://github.com/mozilla/pdfjs-dist.git --depth 1 --single-branch --branch ${DOC_STATIC_ASSETS_BRANCH}

echo "-----------------------------------------------------------------------------------"
echo "Bumping highlightjs version in package.json thirdparty-dependencies"
echo "-----------------------------------------------------------------------------------"
PDFJS_VERSION=$(cd pdfjs-dist && ../build/current_version.sh)

echo "Bumping highlightjs version to ${PDFJS_VERSION}"
sed -i '' "s/\(\"pdfjs\": \)\".*\"/\1\"${PDFJS_VERSION}\"/g" package.json

echo "-----------------------------------------------------------------------------------"
echo "Copying relevant files to third-party directory..."
echo "-----------------------------------------------------------------------------------"
Expand Down
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,5 +157,13 @@
},
"resolutions": {
"mojito-rb-gen/merge": "1.2.1"
},
"thirdparty-dependencies": {
ConradJChan marked this conversation as resolved.
Show resolved Hide resolved
"highlightjs": "9.7.0",
"papaparse": "4.1.2",
"pdfjs": "2.2.228",
"remarkable": "1.7.1",
"shaka-player": "2.5.3",
"swfobject": "2.3.2"
}
}