-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # server/requirements/requirements.php
- Loading branch information
Showing
9 changed files
with
216 additions
and
58 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 @@ | ||
* @angrybrad @brandonkelly |
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,32 @@ | ||
name: Generate Release | ||
on: | ||
push: | ||
tags: | ||
- "*.*.*" | ||
|
||
jobs: | ||
generate_release: | ||
name: Generate release | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Archive release | ||
uses: thedoctor0/zip-release@master | ||
with: | ||
type: tar | ||
directory: ./server | ||
filename: ../craftcms-server-check.tar.gz | ||
exclusions: '*.git*' | ||
|
||
- name: Generate SHA256 | ||
run: sha256sum -b craftcms-server-check.tar.gz > sha256sum.txt | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
sha256sum.txt | ||
craftcms-server-check.tar.gz |
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
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,50 @@ | ||
#!/bin/bash | ||
|
||
# Craft CMS Server Check (one-liner) | ||
# | ||
# From the environment you want to check, run: | ||
# `curl -Lsf https://raw.githubusercontent.com/craftcms/server-check/HEAD/check.sh | bash` | ||
|
||
[[ $- = *i* ]] && echo "Don't source this script!" && return 10 | ||
|
||
checkTools() { | ||
Tools=("curl" "php" "rm" "tar" "grep" "cut") | ||
|
||
for tool in ${Tools[*]}; do | ||
if ! checkCmd $tool; then | ||
echo "Aborted, missing $tool." | ||
exit 6 | ||
fi | ||
done | ||
} | ||
|
||
checkCmd() { | ||
command -v "$1" > /dev/null 2>&1 | ||
} | ||
|
||
function serverCheck() { | ||
checkTools | ||
|
||
tmpDir="/tmp/craftcms-server-check" | ||
assetUrl="https://github.com/craftcms/server-check/releases/latest/download/craftcms-server-check.tar.gz" | ||
downloadToFile="${tmpDir}/craftcms-server-check.tar.gz" | ||
phpScript="${tmpDir}/checkit.php" | ||
|
||
echo "Downloading file… ${assetUrl}" | ||
mkdir "${tmpDir}" | ||
curl -fsSL "${assetUrl}" --output "${downloadToFile}" | ||
|
||
echo "Extracting…" | ||
tar -xzf "${downloadToFile}" -C "${tmpDir}" | ||
|
||
echo "Running Craft Server Check…" | ||
php $phpScript | ||
returnCode=$? | ||
|
||
rm -rf "${tmpDir}" | ||
|
||
return $returnCode | ||
} | ||
|
||
serverCheck | ||
exit $? |
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
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