Skip to content

Commit

Permalink
Merge pull request #14 from donhector/role-fonts
Browse files Browse the repository at this point in the history
role fonts
  • Loading branch information
donhector authored Feb 22, 2022
2 parents 3ccceb1 + 8a3288a commit 30e9933
Show file tree
Hide file tree
Showing 12 changed files with 461 additions and 373 deletions.
1 change: 1 addition & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
extra_plugins: |
conventional-changelog-conventionalcommits
@semantic-release/changelog
@semantic-release/exec
@semantic-release/git
env:
GITHUB_TOKEN: ${{ secrets.PAT_REPO_FULL }}
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
### Ansible
*.retry
.vault-pass*
*.tar.gz

### Pipenv
.venv
Expand All @@ -13,3 +14,6 @@
.cache

XXX/

### dotnev files
*.env
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_stages: [commit, manual]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.1.0
hooks:
- id: check-yaml
# https://github.com/pre-commit/pre-commit-hooks/issues/273
Expand Down
129 changes: 129 additions & 0 deletions .releaserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
---
# Branches from where releases can happen
branches:
- main
- master

# Print additional info
debug: true

# Use 'conventionalcommits' preset instead of the default 'angular'
# this will passed down to all plugins
preset: conventionalcommits

# List of plugins to use.
# Since this project is an Ansible role we won't use the npm plugin.
# Since I'm not insterested in having a dedicated CHANGELOG.md file,
# I won't be using the 'changelog' plugin to create one nor the 'git'
# plugin to commit the generated 'CHANGELOG.md' back to git
plugins:
# Analyze that commits conform to the preset specification
- - "@semantic-release/commit-analyzer"
- releaseRules:
- type: feat
release: minor
- type: fix
release: patch
- type: docs
release: patch
- type: perf
release: patch
- type: refactor
release: patch
- type: revert
release: patch
- type: chore
release: false
- type: build
release: false
- type: ci
release: false
- type: test
release: false
- type: style
release: false
parserOpts:
noteKeywords:
- BREAKING CHANGE
- BREAKING CHANGES
- BREAKING

# Generate release notes. These will be embedded in the Github release body
- - "@semantic-release/release-notes-generator"
- presetConfig:
types:
- type: feat
section: ":sparkles: Features"
- type: fix
section: ":bug: Bug Fixes"
- type: docs
section: ":eyes: Misc"
- type: chore
section: ":eyes: Misc"
- type: perf
section: ":muscle: Improvements"
- type: refactor
section: ":muscle: Improvements"
- type: style
section: ":muscle: Improvements"
- type: ci
section: ":robot: Automation"
- type: build
section: ":robot: Automation"
- type: test
section: ":robot: Automation"
- type: revert
section: ":poop: Revert"
writerOpts:
groupBy: type
# commitGroupsSort: title
commitGroupsSort:
- feat
- fix
- perf
- refactor
- style
- ci
- build
- test
- revert
- docs
- chore
commitsSort: header
# commitsSort:
# - scope
# - subject
parserOpts:
noteKeywords:
- BREAKING CHANGE
- BREAKING CHANGES
- BREAKING

# Generate us a changelog file
- - "@semantic-release/changelog"
- changelogFile: CHANGELOG.md

- - "@semantic-release/exec"
- prepareCmd: "sed -i 's/^version:.*/version: ${nextRelease.version}/g' donhector/workstation/galaxy.yml"

# Commit the generated changelog file into our git repo.
# Since we are enforcing conventional commmits in our project,
# we ensure the commit message also follows the specification.
# Additionally, to prevent this commit from triggering a new release workflow
# (ie. infinite release loop), we use the '[skip ci]' text,
# so our release workflow logic can easily filter out / ignore these kind of commits.
# In fact, since recently, Github workflows knows how to handle this logic automatically
# See (https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/)
- - "@semantic-release/git"
- assets:
- CHANGELOG.md
- donhector/workstation/galaxy.yml
message: "ci(release): update collection to ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"

# Create a release in Github
- - "@semantic-release/github"
- assets:
- path: LICENSE.txt
label: LICENSE
- path: donhector/workstation/donhector-workstation-${nextRelease.version}.tar.gz
label: donhector-workstation-${nextRelease.version}.tar.gz
41 changes: 41 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
ifneq (,$(wildcard ./.env))
include .env
export
endif


define hr
@printf '%.s─' $$(seq 1 $$(tput cols))
endef


.PHONY: all
all: install security test

.PHONY: install
install:
$(call hr)
@command -v python3 2>&1 >/dev/null || echo "Please install python3!"
@command -v pipenv 2>&1 >/dev/null || pip3 install pipenv
@which pip3 | grep -q 'shim' && asdf reshim python || true
@pipenv install --dev
@[ -f .git/hooks/pre-commit ] || pipenv run pre-commit install

## remove our pipenv environment
.PHONY: clean
clean:
$(call hr)
@pipenv --rm

## Update pipenv dependencies along with pre-commit
.PHONY: update
update:
$(call hr)
@pipenv update --dev
@pipenv run pre-commit autoupdate

## Test for known vulnerabilities in our pipenv environment
.PHONY: security
security:
$(call hr)
@pipenv check
Loading

0 comments on commit 30e9933

Please sign in to comment.