plugin deployment script, upload distributabkes mode for site deploy script
This commit is contained in:
parent
9924d02cb4
commit
474293cfe3
26
bin/deploy_plugin
Executable file
26
bin/deploy_plugin
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright 2026 Sergey S. Chernov real.sergeych@gmail.com
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
echo
|
||||
echo "Creating plugin"
|
||||
echo
|
||||
./gradlew buildInstallablePlugin
|
||||
deploy_site -u
|
||||
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# Copyright 2025 Sergey S. Chernov real.sergeych@gmail.com
|
||||
# Copyright 2026 Sergey S. Chernov real.sergeych@gmail.com
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,6 +17,14 @@
|
||||
#
|
||||
#
|
||||
|
||||
upload_only=false
|
||||
for arg in "$@"; do
|
||||
if [[ "$arg" == "-u" || "$arg" == "--upload-only" ]]; then
|
||||
upload_only=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
function checkState() {
|
||||
if [[ $? != 0 ]]; then
|
||||
echo
|
||||
@ -24,9 +32,10 @@ function checkState() {
|
||||
echo
|
||||
exit 100
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Update docs/idea_plugin.md to point to the latest built IDEA plugin zip
|
||||
# from ./distributables before building the site. The change is temporary and
|
||||
# the original file is restored right after the build.
|
||||
@ -107,6 +116,8 @@ function refreshTextmateZip() {
|
||||
(cd editors && zip -rq ../distributables/lyng-textmate.zip .)
|
||||
}
|
||||
|
||||
|
||||
if [[ "$upload_only" == false ]]; then
|
||||
# Update the IDEA plugin download link in docs (temporarily), then build, then restore the doc
|
||||
refreshTextmateZip
|
||||
updateIdeaPluginDownloadLink || echo "WARN: proceeding without updating IDEA plugin download link"
|
||||
@ -125,9 +136,7 @@ if [[ $BUILD_RC -ne 0 ]]; then
|
||||
echo
|
||||
exit 100
|
||||
fi
|
||||
|
||||
|
||||
#exit 0
|
||||
fi
|
||||
|
||||
# Prepare working dir
|
||||
ssh -p ${SSH_PORT} ${SSH_HOST} "
|
||||
@ -143,12 +152,15 @@ ssh -p ${SSH_PORT} ${SSH_HOST} "
|
||||
fi
|
||||
";
|
||||
|
||||
if [[ "$upload_only" == false ]]; then
|
||||
# sync files
|
||||
SRC=./site/build/dist/js/productionExecutable
|
||||
rsync -e "ssh -p ${SSH_PORT}" -avz -r -d --delete ${SRC}/* ${SSH_HOST}:${ROOT}/build/dist
|
||||
checkState
|
||||
#rsync -e "ssh -p ${SSH_PORT}" -avz ./static/* ${SSH_HOST}:${ROOT}/build/dist
|
||||
#checkState
|
||||
fi
|
||||
|
||||
rsync -e "ssh -p ${SSH_PORT}" -avz -r -d --delete distributables/* ${SSH_HOST}:${ROOT}/build/dist/distributables
|
||||
checkState
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user