-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from alvinjohnsonso/ps-validator
Prestashop Coding Standard
- Loading branch information
Showing
49 changed files
with
646 additions
and
549 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
*.zip | ||
./build/tawkto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/sh | ||
|
||
build_dir=$(dirname $0); | ||
|
||
build_release_file() { | ||
if [ -z "$1" ] | ||
then | ||
echo "Prestashop version wasn't specified"; | ||
return; | ||
fi | ||
|
||
ps_version=$1; | ||
ps_dir=$build_dir/../prestashop$ps_version/; | ||
|
||
echo "Building Prestashop $ps_version..." | ||
echo "Creating temporary directory" | ||
rm -rf $build_dir/tawkto | ||
mkdir $build_dir/tawkto | ||
|
||
echo "Copying files to temporary directory" | ||
cp -r $ps_dir/* $build_dir/tawkto/ | ||
|
||
echo "Retrieving release version" | ||
release_version=$(retrieve_version $ps_dir); | ||
|
||
echo "Creating zip file" | ||
(cd $build_dir && zip -9 -rq tawk-prestashop-$ps_version-$release_version.zip tawkto) | ||
|
||
echo "Cleaning up" | ||
rm -rf $build_dir/tawkto | ||
|
||
echo "Done building Prestashop $ps_version!" | ||
} | ||
|
||
retrieve_version() { | ||
ps_dir=$1; | ||
awk 'gsub(/<version><!\[CDATA\[|]]><\/version>/,"")' $ps_dir/config.xml | xargs; | ||
} | ||
|
||
build_release_file 1.6; | ||
build_release_file 1.7; |
Oops, something went wrong.