Guide - equip/skeleton GitHub Wiki
What is this?
The skeleton
package is a repository that can be used to create a new package.
Why?
All of the default configuration and base requirements are already set in this package. By replacing a few variables throughout the package and configuring a few services, a new package can be created quickly.
How?
First, clone this repository:
git clone https://github.com/equip/skeleton.git my-pkg
Changing Variables
Next, replace all of the package variables. The following variables are defined in various files:
:package
the simple name of the package:description
the description of the package:year
the year the package was created:author
the author of the package:twitter
the author's Twitter username:owner
the author's full name:author
the author's full name:namespace
the sub-namespace of the package
For example:
sed -i '' -e 's/:package/my-pkg/g' composer.json README.md
sed -i '' -e 's/:description/An awesome thing that does things/g' composer.json README.md
sed -i '' -e 's/:year/2016/g' -e 's/:author/Billy Bob/g' -e 's/:twitter/billybob/g' LICENSE
Commit and Push
Now you can commit the changes and push it:
git commit -a -m 'Create my-pkg basic structure'
git remote set-url origin https://github.com/equip/my-pkg.git
git push
Configure Services
Finally, the following services need to be configured by adding the new package.
Github
- Modify the package options at https://github.com/equip/PKG/settings
- Enable Issues
- Enable Wiki
- Enable the "Restrict editing ... to push access only" option
- Modify the package collaborators at https://github.com/equip/PKG/settings/collaboration
- Add the Admins team with Admin permissions
- Add the Contributors team with Write permissions
Scrutinizer
- Add the new repository at https://scrutinizer-ci.com/g/new
- Enable the "Default Config" shared configuration at https://scrutinizer-ci.com/g/equip/PKG/settings/build-configs
Travis
- Enable builds on the new repository at https://travis-ci.org/profile/equip (you may need to refresh)
- Configure the settings at https://travis-ci.org/equip/PKG/settings an enable:
- Build only if
.travis.yml
is present - Build pushes
- Build pull requests
- Build only if
PullApprove
- Enable reviews on the new repository at https://pullapprove.com/choose-repo/
- Enable branch protection for the
master
branch on Github:- Go to Settings -> Branches
- Choose branch "master"
- Enable the "Protect this branch" option
- Enable the "Require status checks to pass before merging" option
- Do not enable the "Include administrators" option!
- Enable Travis and PullApprove as required
Packagist
- Submit the package at https://packagist.org/packages/submit
- Add at least one more maintainer from the Admins team
- Enable the web hook on Github using your Packagist API key
Codedoc
- Go to https://codedoc.pub/ and choose the "Automatic" tab
- Set the "Source dir" to
/src
- Set the "Title" to the package name, eg "Equip Package"
- Copy the generated "Payload URL"
- Follow the instructions to adding the webhook
- Choose the "Just the push event" option when you setup up the webhook