Adds new release process.

Changes:
1. Removed any reference of `staging` branch from docs
2. Refactored `hooks` to work with master

Closes #76
pull/42/merge
sobolevn 7 years ago
parent 5f2d3b3c1c
commit 12d4b9f6de
No known key found for this signature in database
GPG Key ID: FF672D568AE3C73E

@ -35,14 +35,13 @@ Only required if dealing with manuals, `gh-pages` or releases:
### Branches
We have three long-live branches: `master`, `staging` and `develop` (and `gh-pages` for static site).
We have three long-live branches: `master`, `develop` and `gh-pages` for static site.
It basically looks like that:
> `your-branch` -> `develop` -> `staging` -> `master`
> `your-branch` -> `develop` -> `master`
- `master` branch is protected, since `antigen` and tools like it install the app from the main branch directly. So only fully tested code goes there
- `staging` - this branch is used to create a new `git` tag and a `github` release, then it gets merged into `master`
- `master` branch is protected. So only fully tested code goes there. It is also used to create a new `git` tag and a `github` release
- `develop` is where the development is done and the branch you should send your pull-requests to
### Continuous integration
@ -57,7 +56,7 @@ CI is done with the help of `travis`. `travis` handles multiple environments:
The release process is defined in the `git`-hooks and `.travis.yml`.
When creating a commit inside the `staging` branch (it is usually a documentation and changelog update with the version bump inside `src/version.sh`) it will trigger two main events.
When creating a commit inside the `master` branch (it is usually a documentation and changelog update with the version bump inside `src/version.sh`) it will trigger two main events.
Firstly, new manuals will be created and added to the current commit with `make build-man` on `pre-commit` hook.
@ -69,8 +68,6 @@ if [[ "$NEWEST_TAG" != "v${SCRIPT_VERSION}" ]]; then
fi
```
Then it will be merged inside `master` when ready.
#### Travis releases
When creating a commit inside `master` branch, `travis` on successful build will publish new `deb` and `rpm` packages to [`bintray`][bintray].

@ -4,7 +4,7 @@ set -e
BRANCH_NAME=$(git branch | grep '\*' | sed 's/* //')
if [[ "$BRANCH_NAME" == 'staging' ]]; then
if [[ "$BRANCH_NAME" == 'master' ]]; then
# Build new web documentation:
make build-gh-pages
@ -15,6 +15,6 @@ if [[ "$BRANCH_NAME" == 'staging' ]]; then
if [[ "$NEWEST_TAG" != "v${SCRIPT_VERSION}" ]]; then
# Create new release:
git tag -a "v${SCRIPT_VERSION}" -m "version $SCRIPT_VERSION"
# TODO: echo tag name to stdout
echo "Created new tag 'v${SCRIPT_VERSION}'"
fi
fi

@ -15,7 +15,7 @@ if [[ "$BRANCH_NAME" != '(no branch)' ]]; then
# Run tests:
make test
if [[ "$BRANCH_NAME" == "staging" ]]; then
if [[ "$BRANCH_NAME" == "master" ]]; then
# Build new manuals:
make build-man

Loading…
Cancel
Save