Skip to content
This repository was archived by the owner on Feb 15, 2025. It is now read-only.

Commit 323ba4f

Browse files
committed
Merge branch 'release/v0.1.0-beta'
2 parents c3433f4 + 2c26c87 commit 323ba4f

File tree

43 files changed

+1114
-114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1114
-114
lines changed

.github/release/README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Prerequisites
2+
The release require the following tools installed on your development system:
3+
4+
- Installation
5+
- Linux
6+
Follow this guide https://github.com/nvie/gitflow/wiki/Linux
7+
8+
- OSX
9+
10+
``` brew install git-flow ```
11+
12+
- Initialize git-flow for the project
13+
14+
``` git checkout master && git-flow init -d ```
15+
16+
# Understanding Branches Structure
17+
18+
- master => production ready code
19+
- develop => pre-production code can be deployed on staging instances and well tested by devs before merging their respective Branches
20+
- feature/author/feature-name => these branches will be used by devs who are working on independent modules
21+
- release/v* => branches taken out of develop at some point for releasing a set of feature.
22+
- hotfix/* => branches forked for releasing immediate fixes
23+
24+
25+
# To get started with a new release
26+
Create a branch, update version, and add release notes by running `make-branch`
27+
28+
```
29+
./github/scripts/release/make-branch
30+
```
31+
32+
As part of this script you'll be asked to:
33+
1. Write release notes in CHANGELOG.txt
34+
35+
Almost every feature enhancement should be mentioned, with the most visible/exciting ones first. Use descriptive sentences and give context where appropriate.
36+
37+
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.
38+
39+
Improvements to the code are not worth mentioning.
40+
41+
# To release a version
42+
```
43+
./github/scripts/releases/push-release
44+
```
45+
46+
# Versioning
47+
- we use semantic Versioning

.github/release/make-branch

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
if [[ "$OSTYPE" == "linux-gnu" ]]; then
4+
GITFLOW_COMMAND="git flow"
5+
elif [[ "$OSTYPE" == "darwin"* ]]; then
6+
GITFLOW_COMMAND="git-flow"
7+
fi
8+
9+
echo "It is assumed that you have merged your changes into develop branch."
10+
echo "Creating a release branch release/$RELEASE_VERSION from develop branch"
11+
git checkout develop
12+
13+
echo "Write release notes in CHANGELOG.txt"
14+
$editor CHANGELOG.txt
15+
16+
RELEASE_VERSION=$(head -n1 CHANGELOG.txt | awk '{ print $1 }')
17+
${GITFLOW_COMMAND} release start ${RELEASE_VERSION}
18+
19+
git diff
20+
echo "Verify changes before commit."
21+
git commit -a -m "Bump ${RELEASE_VERSION}" --signoff --no-verify
22+
23+
24+
echo "Push branch to git remote"
25+
${GITFLOW_COMMAND} release publish ${RELEASE_VERSION}

.github/release/push-release

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
function lib_error() {
4+
#statements
5+
echo -e "$(tput setaf 1)$@$(tput sgr0)"
6+
exit $2
7+
}
8+
9+
if [[ "$OSTYPE" == "linux-gnu" ]]; then
10+
GITFLOW_COMMAND="git flow"
11+
elif [[ "$OSTYPE" == "darwin"* ]]; then
12+
GITFLOW_COMMAND="git-flow"
13+
fi
14+
RELEASE_VERSION=$(head -n1 CHANGELOG.txt | awk '{ print $1 }')
15+
${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 " $?
16+
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 " $?
17+
git push --tags

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*.log
22
*.retry
3+
*.DS_Store

CHANGELOG.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
v0.1.0-beta - March 1, 2017
2+
- First Beta Release
3+
- NGINX PageSpeed Support
4+
- PHP7.1 Support
5+
- Shared Hosting Model
6+
- Setup Following Websites
7+
1. HTML
8+
2. PHP
9+
3. MySQL
10+
4. WordPress
11+
5. WordPress W3TC (W3 Total Cache)
12+
6. WordPress FastCGI Cache
13+

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2016 AnsiPress
3+
Copyright (c) 2017 AnsiPress
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# AnsiPress
22

3+
[![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/)
4+
35
## Quick Start
46

57
#### Ansible - [Install Ansible] (https://miteshshah.github.io/devops/ansible/ansible-installation/)
@@ -8,15 +10,29 @@
810

911
```
1012
$ git clone [email protected]:AnsiPress/AnsiPress.git
13+
$ git checkout develop
1114
$ cd AnsiPress
1215
```
1316

17+
#### Setup SSH Server Login Details
18+
19+
* AnsiPress required you can login to remote server via `ssh AnsiPress.local`
20+
* Change the [AnsiPerss.local] (https://github.com/AnsiPress/AnsiPress/blob/develop/hosts#L2) server name
21+
* Make sure you are able to connect server via `ssh example.com`
22+
* Refer - [SSH Configuration] (https://miteshshah.github.io/linux/ssh/ssh-tips-and-tricks/#ssh-config)
23+
1424
#### Run the AnsiPress Playbook
1525

1626
```
17-
$ ansible-playbook -i hosts setup.yml --extra-vars="username=AnsiPress" -v
27+
$ ansible-playbook -i hosts setup.yml --extra-vars="username=html website_name=html.com website_type=html"
28+
$ ansible-playbook -i hosts setup.yml --extra-vars="username=php website_name=php.com website_type=php"
29+
$ ansible-playbook -i hosts setup.yml --extra-vars="username=mysql website_name=mysql.com website_type=mysql"
30+
$ ansible-playbook -i hosts setup.yml --extra-vars="username=wp website_name=wp.com website_type=wp"
31+
$ ansible-playbook -i hosts setup.yml --extra-vars="username=wp website_name=w3tc.com website_type=w3tc"
32+
$ ansible-playbook -i hosts setup.yml --extra-vars="username=wp website_name=wpfc.com website_type=wpfc"
1833
```
1934

35+
#### Donation
2036
[![PayPal Donate](https://cloud.githubusercontent.com/assets/1223371/20793214/ec6ffca2-b7eb-11e6-9614-d893ff77a565.png)] (https://paypal.me/AnsiPress)
2137

2238
Yes you can! Just click on the image above ;)

group_vars/all

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
remote_user: root
44
ansible_python_interpreter: /usr/bin/python3
55

6+
7+
# AnsiPress Server TimeZone
8+
# Why you need UTC TimeZone -
9+
# http://yellerapp.com/posts/2015-01-12-the-worst-server-setup-you-can-make.html
10+
timezone: Etc/UTC
11+
612
# Create New User Account
713
# We can also pass username variable value using following command
814
# ansible-playbook -i hosts -e user_name=mi setup.yml --extra-vars="username=AnsiPress" -v
@@ -20,5 +26,6 @@ packages:
2026
- coreutils
2127
- python3-dev
2228
- python3-pip
29+
- python3-passlib
2330
- python-software-properties
2431
- software-properties-common

roles/bootstrap/tasks/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
- include: roles/libs/tasks/ping.yml
33
- include: roles/libs/tasks/hostname.yml
4+
- include: roles/libs/tasks/timezone.yml
45
- include: roles/libs/tasks/apt/update.yml
56
- include: roles/libs/tasks/apt/dist_upgrade.yml
67
- include: roles/libs/tasks/apt/install.yml

roles/libs/tasks/php_pool.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
# Calculate PHP Pool Number for Username
3+
- name: Calculate PHP Pool Number, Hold on...
4+
shell: echo $(id -u {{ username | lower }} )+8010 | bc
5+
register: php_pool

0 commit comments

Comments
 (0)