-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy-zip.sh
33 lines (21 loc) · 868 Bytes
/
deploy-zip.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env bash
DIRECTORY_SRC="$GITHUB_ACTION_PATH/src"
. "$DIRECTORY_SRC/working-directory.sh"
. "$DIRECTORY_SRC/plugin-zip.sh"
. "$DIRECTORY_SRC/plugin-slug.sh"
#Infer raw plugin slug
PLUGIN_SLUG=$(pluginSlug "$INPUT_PLUGIN_REPOSITORY")
export PLUGIN_SLUG
INPUT_WORKING_DIRECTORY=$(workingDirectory "$INPUT_WORKING_DIRECTORY")
INPUT_ASSETS_DIRECTORY=$(assetsDirectory "$INPUT_ASSETS_DIRECTORY")
echo "➤ Generating zip file..."
#zip working directory
SVN_DIRECTORY=$(mktemp -d -p "$HOME")
SVN_DIRECTORY=$(pluginZipFolder "$INPUT_PLUGIN_ZIP_FOLDER")
export SVN_DIRECTORY
#create directories
mkdir -p "$SVN_DIRECTORY"
INPUT_PLUGIN_ZIP=$(pluginZipName "$INPUT_PLUGIN_ZIP")
zip -r "$INPUT_PLUGIN_ZIP" "$INPUT_WORKING_DIRECTORY" --exclude "$INPUT_ASSETS_DIRECTORY"
echo "::set-output name=plugin-zip::$INPUT_PLUGIN_ZIP"
echo "✓ Zip file generated!"