Skip to content

Commit

Permalink
Merge pull request #2 from xmidt-org/first-release
Browse files Browse the repository at this point in the history
Updated some md files and added travis files
  • Loading branch information
johnabass authored Aug 10, 2020
2 parents a17c396 + 607d2b8 commit 3ccf4df
Show file tree
Hide file tree
Showing 5 changed files with 133 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .travis.gofmt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

if [ -n "$(gofmt -s -l .)" ]; then
echo "Go code is not formatted:"
gofmt -s -d -e .
exit 1
fi
53 changes: 53 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
language: go

go:
- 1.14.x
- tip

os:
- linux

branches:
only:
- main
- /^v[0-9]+\.[0-9]+\.[0-9]+$/

before_install:
- curl -s https://codecov.io/bash > codecov.sh
- chmod 755 ./codecov.sh

install:
- go mod vendor

script:
- if [ -n "$(gofmt -s -l . | grep -v "vendor")" ]; then diff -u <(echo -n) <(gofmt -d $(gofmt -s -l . | grep -v "vendor")); fi
- GO111MODULE=on go test -v -race -coverprofile=coverage.txt ./...

jobs:
fast_finish: true
allow_failures:
- go: tip
include:
- stage: tag
name: "Tag For Release"
if: branch = main && type = push
before_script:
- echo -e "machine github.com\n login $GH_TOKEN" > ~/.netrc
script:
- export OLD_VERSION=$(git describe --tags `git rev-list --tags --max-count=1` | tail -1 | sed 's/v\(.*\)/\1/')
- git config --global user.name "xmidt-bot"
- git config --global user.email "$BOT_EMAIL"
- export TAG=$(cat CHANGELOG.md | perl -0777 -ne 'print "$1" if /.*## \[Unreleased\]\s+## \[(v\d+.\d+.\d+)\].*/s')
- export TODAY=`date +'%m/%d/%Y'`
- export NOTES=$(cat CHANGELOG.md | perl -0777 -ne 'print "$ENV{TODAY}\n\n$1\n" if /.*## \[$ENV{TAG}\]\s(.*?)\s+## \[(v\d+.\d+.\d+)\].*/s')
- if [[ "$TAG" != "" && "$TAG" != "$OLD_VERSION" ]]; then git tag -a "$TAG" -m "$NOTES"; git push origin --tags; echo $?; fi
- stage: release
name: "Make a Release"
if: branch != main
script: skip
deploy:
on:
all_branches: true
tags: true
provider: releases
api_key: "$GH_TOKEN"
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [v0.1.0]
- First release

[Unreleased]: https://github.com/xmidt-org/sallust/compare/v0.1.0..HEAD
[v0.1.0]: https://github.com/xmidt-org/sallust/compare/0.0.0...v0.1.0
69 changes: 64 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,66 @@
If you would like to contribute code to this project you can do so
through GitHub by forking the repository and sending a pull request.
Contribution Guidelines
=======================

Before Comcast accepts your code into the project you must sign the
Comcast Contributor License Agreement ('CLA').
We love to see contributions to the project and have tried to make it easy to
do so. If you would like to contribute code to this project you can do so
through GitHub by [forking the repository and sending a pull request](http://gun.io/blog/how-to-github-fork-branch-and-pull-request/).

If you haven't previously signed a Comcast CLA, you'll automatically be asked to when you open a pull request. Alternatively, we can e-mail you a PDF that you can sign and scan back to us. Please send us an e-mail or create a new GitHub issue to request a PDF version of the CLA.
Before Comcast merges your code into the project you must sign the
[Comcast Contributor License Agreement (CLA)](https://gist.github.com/ComcastOSS/a7b8933dd8e368535378cda25c92d19a).

If you haven't previously signed a Comcast CLA, you'll automatically be asked
to when you open a pull request. Alternatively, we can e-mail you a PDF that
you can sign and scan back to us. Please send us an e-mail or create a new
GitHub issue to request a PDF version of the CLA.

If you have a trivial fix or improvement, please create a pull request and
request a review from a [maintainer](MAINTAINERS.md) of this repository.

If you plan to do something more involved, that involves a new feature or
changing functionality, please first create an [issue](#issues) so a discussion of
your idea can happen, avoiding unnecessary work and clarifying implementation.

A relevant coding style guideline is the [Go Code Review Comments](https://code.google.com/p/go-wiki/wiki/CodeReviewComments).

Documentation
-------------

If you contribute anything that changes the behavior of the application,
document it in the follow places as applicable:
* the code itself, through clear comments and unit tests
* [README](README.md)

This includes new features, additional variants of behavior, and breaking
changes.

Testing
-------

Tests are written using golang's standard testing tools, and are run prior to
the PR being accepted.

Issues
------

For creating an issue:
* **Bugs:** please be as thorough as possible, with steps to recreate the issue
and any other relevant information.
* **Feature Requests:** please include functionality and use cases. If this is
an extension of a current feature, please include whether or not this would
be a breaking change or how to extend the feature with backwards
compatibility.
* **Security Vulnerability:** please report it at
https://my.xfinity.com/vulnerabilityreport and contact the [maintainers](MAINTAINERS.md).

If you wish to work on an issue, please assign it to yourself. If you have any
questions regarding implementation, feel free to ask clarifying questions on
the issue itself.

Pull Requests
-------------

* should be narrowly focused with no more than 3 or 4 logical commits
* when possible, address no more than one issue
* should be reviewable in the GitHub code review tool
* should be linked to any issues it relates to (i.e. issue number after (#) in commit messages or pull request message)
* should conform to idiomatic golang code formatting
3 changes: 3 additions & 0 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Maintainers of this repository:

* John Bass @johnabass

0 comments on commit 3ccf4df

Please sign in to comment.