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

Scrutinizer

Travis

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

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