mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-23 18:53:36 +02:00
Tools: Improve plugin generator release script
This commit is contained in:
parent
a6174c89a9
commit
ea56d020e9
@ -1,12 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
git pull
|
|
||||||
|
|
||||||
if [[ -n $(git status --porcelain) ]]; then
|
|
||||||
echo "There are changes in the repo"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
CLI_DIR="$SCRIPT_DIR/../app-cli"
|
CLI_DIR="$SCRIPT_DIR/../app-cli"
|
||||||
LIB_DIR="$SCRIPT_DIR/../lib"
|
LIB_DIR="$SCRIPT_DIR/../lib"
|
||||||
@ -19,11 +12,3 @@ rsync -a --delete "$LIB_DIR/plugin_types/services/plugins/api/" "$SCRIPT_DIR/gen
|
|||||||
cp "$LIB_DIR/services/plugins/api/types.ts" "$SCRIPT_DIR/generators/app/templates/api/"
|
cp "$LIB_DIR/services/plugins/api/types.ts" "$SCRIPT_DIR/generators/app/templates/api/"
|
||||||
cp "$SCRIPT_DIR/generators/app/templates/api_index.ts" "$SCRIPT_DIR/generators/app/templates/api/index.ts"
|
cp "$SCRIPT_DIR/generators/app/templates/api_index.ts" "$SCRIPT_DIR/generators/app/templates/api/index.ts"
|
||||||
rm -f "$SCRIPT_DIR/generators/app/templates/api/types.d.ts"
|
rm -f "$SCRIPT_DIR/generators/app/templates/api/types.d.ts"
|
||||||
|
|
||||||
yarn link
|
|
||||||
|
|
||||||
"$CLI_DIR/tests/support/plugins/updatePlugins.sh"
|
|
||||||
|
|
||||||
git add -A
|
|
||||||
git c -m "Plugins: Updated types"
|
|
||||||
git push
|
|
||||||
|
22
packages/generator-joplin/updateTypesAndDemos.sh
Executable file
22
packages/generator-joplin/updateTypesAndDemos.sh
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
git pull
|
||||||
|
|
||||||
|
if [[ -n $(git status --porcelain) ]]; then
|
||||||
|
echo "There are changes in the repo"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
|
CLI_DIR="$SCRIPT_DIR/../app-cli"
|
||||||
|
LIB_DIR="$SCRIPT_DIR/../lib"
|
||||||
|
|
||||||
|
./updateTypes.sh
|
||||||
|
|
||||||
|
yarn link
|
||||||
|
|
||||||
|
"$CLI_DIR/tests/support/plugins/updatePlugins.sh"
|
||||||
|
|
||||||
|
git add -A
|
||||||
|
git c -m "Plugins: Updated types"
|
||||||
|
git push
|
@ -16,6 +16,8 @@ async function main() {
|
|||||||
|
|
||||||
console.info(`New version number: ${version}`);
|
console.info(`New version number: ${version}`);
|
||||||
|
|
||||||
|
await execCommandVerbose('updateTypes.sh');
|
||||||
|
|
||||||
await setPackagePrivateField(packageFilePath, false);
|
await setPackagePrivateField(packageFilePath, false);
|
||||||
try {
|
try {
|
||||||
await execCommandVerbose('npm', ['publish']);
|
await execCommandVerbose('npm', ['publish']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user