Skip to content

Commit

Permalink
chore: new guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Sep 2, 2019
1 parent c966953 commit d2ee14d
Show file tree
Hide file tree
Showing 17 changed files with 315 additions and 82 deletions.
53 changes: 7 additions & 46 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,14 @@
version: 2.1

executors:
golang:
working_directory: /go/src/moul.io/moulsay
docker:
- image: circleci/golang:1.12
environment:
GO111MODULE: "on"
DOCKER_IMAGE: moul/moulsay

docker:
docker:
- image: docker:18.06.3-ce-git

orbs:
codecov: codecov/codecov@1.0.5
moul: moul/build@1.5.0
retry: moul/retry@0.6.0
docker: circleci/docker@0.5.13
#dl: moul/dl@1.7.0
tools: gotest/tools@0.0.10

jobs:
go-build:
executor: golang
steps:
- checkout
- retry/install
- tools/mod-download
- tools/mod-tidy-check
- run: retry -m 3 make install
- run: retry -m 3 make test
- moul/install_golangci-lint
- run: PATH=$PATH:$(pwd)/bin retry -m 3 make lint
- codecov/upload:
file: coverage.txt

docker-build:
executor: docker
steps:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- docker/build:
image: moul/moulsay
#- docker/dockerlint
moul: moul/build@1.10.0 # https://github.com/moul/build

workflows:
main:
jobs:
- go-build
- docker-build
- moul/golang-build:
gopkg: moul.io/moulsay
- moul/golang-build:
gopkg: moul.io/moulsay
tag: '1.11'
- moul/docker-build
File renamed without changes.
File renamed without changes.
File renamed without changes.
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG] "
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Type '....'
3. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots / Logs**
If applicable, add screenshots or logs to help explain your problem.

**Versions (please complete the following information, if relevant):**
- Software version: [e.g. v1.2.3, latest, building from sources]
- OS: [e.g. Ubuntu, Mac, iOS, ...]
- Golang version [e.g. 1.12]

**Additional context**
Add any other context about the problem here.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Custom
about: 'Anything else: questions, discussions, thanks, ascii-arts, ...'
title: ''
labels: discussion
assignees: moul

---


20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[IDEA] "
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
9 changes: 9 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!--
Thank you for your contribution to this repo!
Before submitting a pull request, please check the following:
- reference any related issue, PR, link
- use the "WIP" title prefix if you need help or more time to finish your PR
you can remove this markdown comment
-->
File renamed without changes.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
coverage.txt

# Vendors
package-lock.json
node_modules/
vendor/

Expand Down
22 changes: 22 additions & 0 deletions COPYRIGHT
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Copyright 2019 Manfred Touron and other moulsay Developers.

Intellectual Property Notice
----------------------------

moulsay is licensed under the Apache License, Version 2.0
(see LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0) of
the MIT license (see LICENSE-MIT or http://opensource.org/licenses/MIT),
at your option.

Copyrights and patents in the moulsays project are retained
by contributors.
No copyright assignment is required to contribute to moulsay.

SPDX-License-Identifier: (Apache-2.0 OR MIT)

SPDX usage
----------

Individual files may contain SPDX tags instead of the full license text.
This enables machine processing of license information based on the SPDX
License Identifiers that are available here: https://spdx.org/licenses/
2 changes: 1 addition & 1 deletion LICENSE → LICENSE-APACHE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2019 Manfred Touron
Copyright 2019 Manfred Touron <oss@moul.io> (manfred.life)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
19 changes: 19 additions & 0 deletions LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2019 Manfred Touron <oss@moul.io> (manfred.life)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
39 changes: 5 additions & 34 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,36 +1,7 @@
GO ?= go
DOCKER_IMAGE ?= moul/moulsay
GOPKG ?= moul.io/moulsay
DOCKER_IMAGE ?= moul/moulsay
GOBINS ?= .

.PHONY: install
install:
$(GO) install .
all: test install

.PHONY: test
test:
echo "" > /tmp/coverage.txt
set -e; for dir in `find . -type f -name "go.mod" | sed 's@/[^/]*$$@@' | sort | uniq`; do ( set -xe; \
cd $$dir; \
$(GO) test -mod=readonly -v -cover -coverprofile=/tmp/profile.out -covermode=atomic -race ./...; \
if [ -f /tmp/profile.out ]; then \
cat /tmp/profile.out >> /tmp/coverage.txt; \
rm -f /tmp/profile.out; \
fi); done
mv /tmp/coverage.txt .

.PHONY: lint
lint:
golangci-lint run --verbose ./...

.PHONY: release
release:
goreleaser --snapshot --skip-publish --rm-dist
@echo -n "Do you want to release? [y/N] " && read ans && [ $${ans:-N} = y ]
goreleaser --rm-dist

.PHONY: docker
docker:
docker build \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg VERSION=`git describe --tags --always` \
-t $(DOCKER_IMAGE) .
-include rules.mk
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ I take security seriously. If you discover a security issue, please bring it to

### Reporting a Vulnerability

Please **DO NOT** file a public issue, instead send your report privately to m+security-report@42.am.
Please **DO NOT** file a public issue, instead send your report privately to security@moul.io.

Security reports are greatly appreciated and I will publicly thank you for it, although I keep your name confidential if you request it.
21 changes: 21 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"_comment": "this project is not a node.js one, package.json is just used to define some metadata",
"name": "@moul.io/moulsay",
"version": "0.0.1",
"author": "Manfred Touron <oss@moul.io> (https://manfred.life)",
"contributors": [
"Manfred Touron <oss@moul.io> (https://manfred.life)"
],
"license": "(Apache-2.0 OR MIT)",
"scripts": {
"start": "moulsay",
"install": "make install",
"test": "make test"
},
"repository": {
"type": "git",
"url": "https://github.com/moul/moulsay.git"
},
"bugs": "https://github.com/moul/moulsay/issues",
"homepage": "https://moul.io/moulsay"
}

0 comments on commit d2ee14d

Please sign in to comment.