Skip to content

Commit

Permalink
🚀 Version 0.6.0 Release Ready.
Browse files Browse the repository at this point in the history
  • Loading branch information
justinhartman committed Jun 12, 2018
1 parent 9399522 commit 0d8e84c
Show file tree
Hide file tree
Showing 43 changed files with 1,064 additions and 303 deletions.
4 changes: 4 additions & 0 deletions .coverage
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
1..3
ok 1 apache file backup
ok 2 apache copy files
ok 3 apache final configuration
1 change: 1 addition & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
repo_token: qJWIvjD1pMBLhuuCv0fWLCwZrNadN2nnd
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# ignore error-pages
# ignore folders in src directory
# src/httpd/error-pages/
src/git-old/
src/phpmyadmin/


# Exclude symlinks in dist folder
dist/adminer
dist/apache
dist/error-pages
dist/phpmyadmin
dist/websites

# Vendor directory
vendor/
Expand Down
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ matrix:
osx_image: xcode9.2
- os: osx
osx_image: xcode8
- os: osx
osx_image: xcode6.4
# before_install:
# - xcode-select --install
script:
Expand Down
33 changes: 31 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,38 @@
Below is a detailed change-log, along with specific tasks completed, for each
version released to date.

## Version 0.6.0 (12/06/2018)

- [#new](#new)
- Entirely new test suite using [BATS][bats]. Each method is now tested using
individual `.bats` files contained in `./tests/bats/`. To run the entire
test suite issue the following command:
`$ bats tests/bats/`. This assumes you've [installed BATS][install-bats].
- Added [Coveralls][coveralls] support but this is limited as they don't
support `bash` yet. Go figure.
- [#enhancement](#enhancement)
- Changed the success output from `printf` to `echo -e` as `printf` doesn't
work with `bats` properly.
- Removed `dist/websites` symlink as this gets generated at install time.
- [#bugfix](#bugfix)
- Fixed up an array of bugs in individual scripts as debugged with `bats`.
The list of changes is exhaustive so check the diff changes to the
`scripts` folder for more detail.
- Removed the `brew httpd` startup script as it's not needed.
- Removed `scripts/brew_install.sh` as it has been replaced with the main
`./brew` install script.
- Removed the Travis test for `xcode6.4` in `.travis.yml` as this project
doesn't build when running against `macOS 10.9/10.10`. It appears this
is only supported on `macOS 10.11` and later.

## Version 0.5.2 (09/06/2018)

- [#bugfix](#bugfix)
- Fixed output of echo message in:
- `add_domains`
- `apache_config.sh`
- Fixed the extraction directory for phpMyAdmin in `thirdparty_install.sh`.
- Fixed up the `git commit` not happening in correct folder.
- [#enhancement](#enhancement)
- `brew_startup` added to `brew` script.
- Added older versions of `macOS` for Travis to build against.
Expand Down Expand Up @@ -148,14 +173,14 @@ version released to date.

- [#new](#new)
- Symbolic link to `/adminer/`. See issue #6 for more details on how it
will be integrated into the first release candidate.
will be integrated into the first release candidate.
- Added new template files for issue #8:
- ISSUE_TEMPLATE.md
- CONTRIBUTING.md
- PULL_REQUEST_TEMPLATE.md
- [#enhancement](#enhancement)
- Integrated changes from issue #8 to now create `.github/` directory with
templates when setting up a new domain.
templates when setting up a new domain.
- Added `.github/` directory to this actual project using the new
templates created in the #enhancement above.
- [#bugfix](#bugfix)
Expand All @@ -171,3 +196,7 @@ version released to date.

- [#new](#new)
- Initial Release

[bats]: https://github.com/sstephenson/bats
[install-bats]: https://github.com/sstephenson/bats#installing-bats-from-source
[coveralls]: https://coveralls.io/github/justinhartman/Automated-LAMP-with-trusted-localhost-SSL
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Waffle.io - Columns and their card count](https://badge.waffle.io/justinhartman/Automated-LAMP-with-trusted-localhost-SSL.png?columns=all)](https://waffle.io/justinhartman/Automated-LAMP-with-trusted-localhost-SSL?utm_source=badge) [![Build Status](https://travis-ci.org/justinhartman/Automated-LAMP-with-trusted-localhost-SSL.svg?branch=master)](https://travis-ci.org/justinhartman/Automated-LAMP-with-trusted-localhost-SSL)
[![Build Status](https://travis-ci.org/justinhartman/Automated-LAMP-with-trusted-localhost-SSL.svg?branch=master)](https://travis-ci.org/justinhartman/Automated-LAMP-with-trusted-localhost-SSL) [![Coverage Status](https://coveralls.io/repos/github/justinhartman/Automated-LAMP-with-trusted-localhost-SSL/badge.svg?branch=master)](https://coveralls.io/github/justinhartman/Automated-LAMP-with-trusted-localhost-SSL?branch=master) [![Waffle.io - Columns and their card count](https://badge.waffle.io/justinhartman/Automated-LAMP-with-trusted-localhost-SSL.png?columns=all)](https://waffle.io/justinhartman/Automated-LAMP-with-trusted-localhost-SSL?utm_source=badge)

# Fully automated LAMP installation and configuration using Trusted localhost SSL Certificates

Expand Down
1 change: 0 additions & 1 deletion dist/websites

This file was deleted.

3 changes: 2 additions & 1 deletion install
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ main_application ()
{
source $scripts/setup_ssl.sh # Setup self-signed SSL
source $scripts/apache_config.sh # Configure Apache 2
source $scripts/thirdparty_install.sh # Install third-party tools
source $scripts/folder_permissions.sh # Setting correct folder permissions

echo "" >&2
Expand All @@ -62,7 +63,7 @@ main_application ()
echo "| Congratulations! You have successfully |" >&2
echo "| setup your localhost configuration. |" >&2
echo "| All the files you may need to edit are |" >&2
echo "| contained in the `/dist/` folder. This |" >&2
echo "| contained in the /dist/ folder. This |" >&2
echo "| includes any website you add and access to |" >&2
echo "| the ssl, adminer, phpmyadmin, error-pages |" >&2
echo "| and hosts folder. |" >&2
Expand Down
40 changes: 19 additions & 21 deletions scripts/apache_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@ file_backup ()
echo "| Backing up old Apache config files. |" >&2
echo "| |" >&2
echo -e " ---------------------------------------------- ${NOC}\n" >&2
mv $httpd/httpd.conf $httpd/httpd.conf.bak
mv $httpd/extra/httpd-ssl.conf $httpd/extra/httpd-ssl.conf.bak
mv $httpd/extra/httpd-vhosts.conf $httpd/extra/httpd-vhosts.conf.bak
printf "\n${GRN}\xE2\x9C\x94${NOC} ${CYA}Successfully backed up the Apache 2
configuration files.${NOC}\n"
mv ${httpd}/httpd.conf ${httpd}/httpd.conf.original
mv ${httpd}/extra/httpd-ssl.conf ${httpd}/extra/httpd-ssl.conf.original
mv ${httpd}/extra/httpd-vhosts.conf ${httpd}/extra/httpd-vhosts.conf.original
echo -e "\n${GRN}\xE2\x9C\x94${NOC} ${CYA}Successfully backed up the Apache 2 configuration files.${NOC}\n"
}

#######################################
Expand All @@ -66,35 +65,34 @@ copy_files ()
echo "| Copying new Apache config files over... |" >&2
echo "| |" >&2
echo -e " ---------------------------------------------- ${NOC}\n" >&2
cp $source/httpd/conf/httpd.conf $httpd/
cp $source/httpd/conf/httpd-ssl.conf $httpd/extra/
cp $source/httpd/conf/httpd-vhosts.conf $httpd/extra/
cp $source/httpd/extra/httpd-custom-alias.conf $httpd/extra/
cp $source/httpd/extra/httpd-custom-directory.conf $httpd/extra/
cp $source/httpd/extra/httpd-custom-error-pages.conf $httpd/extra/
printf "\n${GRN}\xE2\x9C\x94${NOC} ${CYA}Successfully copied the new Apache 2
configuration files.${NOC}\n"
cp ${source}/httpd/conf/httpd.conf ${httpd}/
cp ${source}/httpd/conf/httpd-ssl.conf ${httpd}/extra/
cp ${source}/httpd/conf/httpd-vhosts.conf ${httpd}/extra/
cp ${source}/httpd/extra/httpd-custom-alias.conf ${httpd}/extra/
cp ${source}/httpd/extra/httpd-custom-directory.conf ${httpd}/extra/
cp ${source}/httpd/extra/httpd-custom-error-pages.conf ${httpd}/extra/
echo -e "\n${GRN}\xE2\x9C\x94${NOC} ${CYA}Successfully copied the new Apache 2 configuration files.${NOC}\n"
}

#######################################
# Create website folder and restart
# Apache.
# Create website folder, restart
# Apache and create symbolic links.
# Globals:
# None
# Arguments:
# None
# Returns:
# None
#######################################
final_steps ()
final_configuration ()
{
mkdir -p $websites # Create default web root
mkdir -p ${websites} # Create default web root
ln -s ${websites} ${dist}/websites
ln -s ${httpd} ${dist}/apache
apachectl restart # (Re)start Apache
printf "\n${GRN}\xE2\x9C\x94${NOC} ${CYA}Your website folder has been
created at $websites
and Apache has been successfully restarted.${NOC}\n"
echo -e "\n${GRN}\xE2\x9C\x94${NOC} ${CYA}Your website folder has been created at ${websites} and you can edit your files in the 'dist' folder.${NOC}\n"
}

file_backup
copy_files
final_steps
final_configuration
114 changes: 0 additions & 114 deletions scripts/brew_install.sh

This file was deleted.

12 changes: 5 additions & 7 deletions scripts/folder_and_git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,11 @@ folder_and_git ()
echo "| Add website folder and initialise git repo. |" >&2
echo "| |" >&2
echo -e " ---------------------------------------------- ${NOC}\n" >&2
mkdir -p $websites/${domain}
printf "\n${GRN}\xE2\x9C\x94${NOC} ${CYA}Successfully created folder in
$websites/${domain}.${NOC}\n"
git init $websites/${domain}
ls -lha $websites/${domain}
printf "\n${GRN}\xE2\x9C\x94${NOC} ${CYA}Successfully created folder and
initialised git repo for ${domain}.${NOC}\n"
mkdir -p ${websites}/${domain}
echo -e "\n${GRN}\xE2\x9C\x94${NOC} ${CYA}Successfully created folder in ${websites}/${domain}.${NOC}\n"
git init ${websites}/${domain}
ls -lha ${websites}/${domain}
echo -e "\n${GRN}\xE2\x9C\x94${NOC} ${CYA}Successfully created folder and initialised git repo for ${domain}.${NOC}\n"
}

folder_and_git
11 changes: 5 additions & 6 deletions scripts/folder_permissions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
# Returns:
# String Success message.
#######################################
folder_permissions ()
folder_ownership ()
{
echo "" >&2
echo -e "${GRY} ----------------------------------------------" >&2
Expand All @@ -44,11 +44,10 @@ folder_permissions ()
echo "| user account for the application folders. |" >&2
echo "| |" >&2
echo -e " ---------------------------------------------- ${NOC}\n" >&2
chown -R $username:$group $main
chown -R $username:$group $httpd
printf "\n${GRN}\xE2\x9C\x94${NOC} ${CYA}Successfully set folder permissions
recursively on $main and $httpd.${NOC}\n"
chown -R ${username}:${group} ${main}
chown -R ${username}:${group} ${httpd}
echo -e "\n${GRN}\xE2\x9C\x94${NOC} ${CYA}Successfully set folder permissions recursively on ${main} and ${httpd}.${NOC}\n"
}

# Output the method
folder_permissions
folder_ownership
12 changes: 6 additions & 6 deletions scripts/git_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ git_setup ()
echo "| git initial structure, files and check-in. |" >&2
echo "| |" >&2
echo -e " ---------------------------------------------- ${NOC}\n" >&2
cp -R $source/git $websites/${domain}
ls -lha $websites/${domain}
cd $websites/${domain}
cp -R ${source}/git/templates/_core ${websites}/${domain}
cp ${source}/git/templates/_licenses/mit.txt ${websites}/${domain}/LICENSE
ls -lha ${websites}/${domain}
cd ${websites}/${domain}
git add -A
git commit -m "Created git structure, .github template and initial project commit."
cd
printf "\n${GRN}\xE2\x9C\x94${NOC} ${CYA}Successfully created files and
committed changes.${NOC}\n"
echo "\n${GRN}\xE2\x9C\x94${NOC} ${CYA}Successfully created files and${NOC}"
echo "${CYA}committed changes.${NOC}\n"
}

git_setup
Loading

0 comments on commit 0d8e84c

Please sign in to comment.