-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
1,114 additions
and
114 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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Prerequisites | ||
The release require the following tools installed on your development system: | ||
|
||
- Installation | ||
- Linux | ||
Follow this guide https://github.com/nvie/gitflow/wiki/Linux | ||
|
||
- OSX | ||
|
||
``` brew install git-flow ``` | ||
|
||
- Initialize git-flow for the project | ||
|
||
``` git checkout master && git-flow init -d ``` | ||
|
||
# Understanding Branches Structure | ||
|
||
- master => production ready code | ||
- develop => pre-production code can be deployed on staging instances and well tested by devs before merging their respective Branches | ||
- feature/author/feature-name => these branches will be used by devs who are working on independent modules | ||
- release/v* => branches taken out of develop at some point for releasing a set of feature. | ||
- hotfix/* => branches forked for releasing immediate fixes | ||
|
||
|
||
# To get started with a new release | ||
Create a branch, update version, and add release notes by running `make-branch` | ||
|
||
``` | ||
./github/scripts/release/make-branch | ||
``` | ||
|
||
As part of this script you'll be asked to: | ||
1. Write release notes in CHANGELOG.txt | ||
|
||
Almost every feature enhancement should be mentioned, with the most visible/exciting ones first. Use descriptive sentences and give context where appropriate. | ||
|
||
Bug fixes are worth mentioning if it's likely that they've affected lots of people, or if they were regressions in the previous version. | ||
|
||
Improvements to the code are not worth mentioning. | ||
|
||
# To release a version | ||
``` | ||
./github/scripts/releases/push-release | ||
``` | ||
|
||
# Versioning | ||
- we use semantic Versioning |
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,25 @@ | ||
#!/bin/bash | ||
|
||
if [[ "$OSTYPE" == "linux-gnu" ]]; then | ||
GITFLOW_COMMAND="git flow" | ||
elif [[ "$OSTYPE" == "darwin"* ]]; then | ||
GITFLOW_COMMAND="git-flow" | ||
fi | ||
|
||
echo "It is assumed that you have merged your changes into develop branch." | ||
echo "Creating a release branch release/$RELEASE_VERSION from develop branch" | ||
git checkout develop | ||
|
||
echo "Write release notes in CHANGELOG.txt" | ||
$editor CHANGELOG.txt | ||
|
||
RELEASE_VERSION=$(head -n1 CHANGELOG.txt | awk '{ print $1 }') | ||
${GITFLOW_COMMAND} release start ${RELEASE_VERSION} | ||
|
||
git diff | ||
echo "Verify changes before commit." | ||
git commit -a -m "Bump ${RELEASE_VERSION}" --signoff --no-verify | ||
|
||
|
||
echo "Push branch to git remote" | ||
${GITFLOW_COMMAND} release publish ${RELEASE_VERSION} |
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,17 @@ | ||
#!/bin/bash | ||
|
||
function lib_error() { | ||
#statements | ||
echo -e "$(tput setaf 1)$@$(tput sgr0)" | ||
exit $2 | ||
} | ||
|
||
if [[ "$OSTYPE" == "linux-gnu" ]]; then | ||
GITFLOW_COMMAND="git flow" | ||
elif [[ "$OSTYPE" == "darwin"* ]]; then | ||
GITFLOW_COMMAND="git-flow" | ||
fi | ||
RELEASE_VERSION=$(head -n1 CHANGELOG.txt | awk '{ print $1 }') | ||
${GITFLOW_COMMAND} release finish ${RELEASE_VERSION} || lib_error "\tIssue occured while publishing commits to master branch. \n\tAfter you resolve issue run following command to finish release. \n\t\t# git checkout master && git push\n\t\t# git push --tags " $? | ||
git checkout master && git push || lib_error "\tIssue occured while publishing commits to master branch. \n\tAfter you resolve issue run following command to finish release. \n\t\t# git checkout master && git push\n\t\t# git push --tags " $? | ||
git push --tags |
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,2 +1,3 @@ | ||
*.log | ||
*.retry | ||
*.DS_Store |
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,13 @@ | ||
v0.1.0-beta - March 1, 2017 | ||
- First Beta Release | ||
- NGINX PageSpeed Support | ||
- PHP7.1 Support | ||
- Shared Hosting Model | ||
- Setup Following Websites | ||
1. HTML | ||
2. PHP | ||
3. MySQL | ||
4. WordPress | ||
5. WordPress W3TC (W3 Total Cache) | ||
6. WordPress FastCGI Cache | ||
|
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# AnsiPress | ||
|
||
[![saythanks](https://img.shields.io/badge/say-thanks-ff69b4.svg)](https://saythanks.io/to/MiteshShah) [![Join AnsiPress Slack Channel](https://ansipress.herokuapp.com/badge.svg)](https://ansipress.herokuapp.com/) | ||
|
||
## Quick Start | ||
|
||
#### Ansible - [Install Ansible] (https://miteshshah.github.io/devops/ansible/ansible-installation/) | ||
|
@@ -8,15 +10,29 @@ | |
|
||
``` | ||
$ git clone [email protected]:AnsiPress/AnsiPress.git | ||
$ git checkout develop | ||
$ cd AnsiPress | ||
``` | ||
|
||
#### Setup SSH Server Login Details | ||
|
||
* AnsiPress required you can login to remote server via `ssh AnsiPress.local` | ||
* Change the [AnsiPerss.local] (https://github.com/AnsiPress/AnsiPress/blob/develop/hosts#L2) server name | ||
* Make sure you are able to connect server via `ssh example.com` | ||
* Refer - [SSH Configuration] (https://miteshshah.github.io/linux/ssh/ssh-tips-and-tricks/#ssh-config) | ||
|
||
#### Run the AnsiPress Playbook | ||
|
||
``` | ||
$ ansible-playbook -i hosts setup.yml --extra-vars="username=AnsiPress" -v | ||
$ ansible-playbook -i hosts setup.yml --extra-vars="username=html website_name=html.com website_type=html" | ||
$ ansible-playbook -i hosts setup.yml --extra-vars="username=php website_name=php.com website_type=php" | ||
$ ansible-playbook -i hosts setup.yml --extra-vars="username=mysql website_name=mysql.com website_type=mysql" | ||
$ ansible-playbook -i hosts setup.yml --extra-vars="username=wp website_name=wp.com website_type=wp" | ||
$ ansible-playbook -i hosts setup.yml --extra-vars="username=wp website_name=w3tc.com website_type=w3tc" | ||
$ ansible-playbook -i hosts setup.yml --extra-vars="username=wp website_name=wpfc.com website_type=wpfc" | ||
``` | ||
|
||
#### Donation | ||
[![PayPal Donate](https://cloud.githubusercontent.com/assets/1223371/20793214/ec6ffca2-b7eb-11e6-9614-d893ff77a565.png)] (https://paypal.me/AnsiPress) | ||
|
||
Yes you can! Just click on the image above ;) | ||
|
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
--- | ||
- include: roles/libs/tasks/ping.yml | ||
- include: roles/libs/tasks/hostname.yml | ||
- include: roles/libs/tasks/timezone.yml | ||
- include: roles/libs/tasks/apt/update.yml | ||
- include: roles/libs/tasks/apt/dist_upgrade.yml | ||
- include: roles/libs/tasks/apt/install.yml |
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,5 @@ | ||
--- | ||
# Calculate PHP Pool Number for Username | ||
- name: Calculate PHP Pool Number, Hold on... | ||
shell: echo $(id -u {{ username | lower }} )+8010 | bc | ||
register: php_pool |
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 was deleted.
Oops, something went wrong.
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,4 @@ | ||
--- | ||
# Setup TimeZone | ||
- name: Setup Timezone to UTC, Hold on... | ||
timezone: name={{ timezone }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,4 +1,4 @@ | ||
--- | ||
# Setup User Account | ||
- name: Setting up User Account, Hold on... | ||
user: name={{ username }} shell=/bin/bash | ||
- name: Setup User Account, Hold on... | ||
user: name={{ username | lower }} shell=/bin/bash |
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,9 @@ | ||
--- | ||
- name: service nginx reload | ||
service: name=nginx state=reloaded | ||
|
||
- name: service php7.1-fpm reload | ||
service: name=php7.1-fpm state=reloaded | ||
|
||
- name: service mysql restart | ||
service: name=mysql state=restarted |
Oops, something went wrong.