Skip to content

Commit

Permalink
Updated release code
Browse files Browse the repository at this point in the history
  • Loading branch information
mrinc committed Oct 8, 2024
1 parent 000755b commit e64c514
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
9 changes: 6 additions & 3 deletions envs.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/bin/bash

# Get the absolute path of the current directory
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

# Directory paths
export SOURCE_DIR="src"
export BUILD_DIR="build"
export DIST_DIR="dist"
export SOURCE_DIR="$CURRENT_DIR/src"
export BUILD_DIR="$CURRENT_DIR/build"
export DIST_DIR="$CURRENT_DIR/dist"

# File names
export MAIN_PHP_FILE="betterportal-theme-embedded.php"
Expand Down
7 changes: 6 additions & 1 deletion release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,10 @@ VERSION=$1
# Load environment variables
source ./envs.sh

# Create the distribution directory if it doesn't exist
mkdir -p $DIST_DIR
zip -r $DIST_DIR/betterportal-theme-embedded-$VERSION.zip

# Change to the build directory and create the zip file
pushd $BUILD_DIR
zip -r $DIST_DIR/betterportal-theme-embedded-$VERSION.zip .
popd

0 comments on commit e64c514

Please sign in to comment.