Skip to content

Commit

Permalink
chore: rename vivliostyle-viewer archive file
Browse files Browse the repository at this point in the history
  • Loading branch information
MurakamiShinyu committed Mar 20, 2020
1 parent eef5828 commit d9e62f0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dev": "lerna run dev --parallel",
"format": "lerna run format",
"lint": "lerna run lint",
"now-build": "VIVLIOSTYLE_VERSION=canary yarn build && ./scripts/create-archive.js vivliostyle-canary vivliostyle-canary.zip",
"now-build": "VIVLIOSTYLE_VERSION=canary yarn build && ./scripts/create-archive.js vivliostyle-canary vivliostyle-viewer-canary.zip",
"ship": "lerna publish from-package",
"ship:canary": "lerna publish --canary",
"ship:prerelease": "yarn ship --dist-tag next",
Expand Down
2 changes: 1 addition & 1 deletion scripts/create-archive.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const archiver = require("archiver");

const argv = process.argv.slice(2);
const archiveDir = argv[0] || `vivliostyle-latest`;
const archiveName = argv[1] || `vivliostyle.zip`;
const archiveName = argv[1] || `vivliostyle-viewer.zip`;
console.log(`Generating ${archiveName} from ${archiveDir}`);

shell.mkdir(archiveDir);
Expand Down
14 changes: 8 additions & 6 deletions scripts/travis-after-success-hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function setup-git() {
function build-archive() {
echo "===> Generating Viewer Archive"
archiveDir=${1:-vivliostyle-latest}
archiveName=${2:-vivliostyle.zip}
archiveName=${2:-vivliostyle-viewer.zip}
echo "Generating ${archiveName} from ${archiveDir}"

mkdir ${archiveDir}
Expand All @@ -31,7 +31,9 @@ function build-archive() {
cp -R ./packages/viewer/lib/* ${archiveDir}/viewer/
cp -R ./scripts/package-artifacts/* ${archiveDir}/

zip -qr ${archiveName} ${archiveDir}
cd ${archiveDir}
zip -qr ../${archiveName} .
cd ..
rm -rf ${archiveDir}
}

Expand Down Expand Up @@ -62,7 +64,7 @@ function inject-env-var() {
PRE_RELEASE=false
fi
ARCHIVE_DIR="vivliostyle"
ARCHIVE_PATH="vivliostyle.zip"
ARCHIVE_PATH="vivliostyle-viewer.zip"
VIEWER_ARTIFACTS=packages/viewer/lib/*
VERSION=$(echo ${TRAVIS_TAG} | sed 's/^v\(.*\)/\1/')
}
Expand Down Expand Up @@ -102,7 +104,7 @@ fi
# CANARY_VIEWER_ROOT="gh-pages/viewer"
# mkdir -p "${CANARY_VIEWER_ROOT}"
# cp -R ${VIEWER_ARTIFACTS} "gh-pages/viewer/"
# cp -R "${ARCHIVE_PATH}" "gh-pages/downloads/vivliostyle-canary.zip"
# cp -R "${ARCHIVE_PATH}" "gh-pages/downloads/vivliostyle-viewer-canary.zip"
# echo "===> Pushing changes to gh-pages"
# cd gh-pages
# git add .
Expand All @@ -128,7 +130,7 @@ if [[ $IS_VALID_TAG = true ]]; then
npm i -g conventional-changelog-cli github-release-cli
CHANGELOG=$(conventional-changelog -p angular)
echo "===> CHANGELOG=${CHANGELOG}"
TAGGED_ARCHIVE="vivliostyle-${VERSION}.zip"
TAGGED_ARCHIVE="vivliostyle-viewer-${VERSION}.zip"
cp ${ARCHIVE_PATH} ${TAGGED_ARCHIVE}
if [[ $STABLE_RELEASE = true ]]; then
[[ $DEBUG_HOOK = false ]] && github-release upload \
Expand Down Expand Up @@ -182,7 +184,7 @@ if [[ $IS_VALID_TAG = true ]]; then
git clone -q --depth=1 --branch=master git@${VIVLIOSTYLE_ORG_GIT_HOST}:vivliostyle/vivliostyle.org.git vivliostyle.org
mkdir -p vivliostyle.org/viewer
cp -R ${VIEWER_ARTIFACTS} vivliostyle.org/viewer/
cp -R ${ARCHIVE_PATH} vivliostyle.org/downloads/vivliostyle-latest.zip
cp -R ${ARCHIVE_PATH} vivliostyle.org/downloads/vivliostyle-viewer-latest.zip
echo "===> Pushing changes to vivliostyle.org"
cd vivliostyle.org
git add .
Expand Down

1 comment on commit d9e62f0

@vercel
Copy link

@vercel vercel bot commented on d9e62f0 Mar 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.