1
0
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:
Laurent Cozic 2021-12-27 18:22:19 +01:00
parent a6174c89a9
commit ea56d020e9
3 changed files with 24 additions and 15 deletions

View File

@ -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

View 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

View File

@ -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']);