Skip to content

Commit

Permalink
Merge pull request #10 from cytopia/release-0.4
Browse files Browse the repository at this point in the history
Release 0.4
  • Loading branch information
cytopia authored Mar 30, 2021
2 parents ba6494a + 44d08ec commit 1cc5773
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 2 deletions.
1 change: 0 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
- 'latest'
refs:
- 'master'
- '0.3'
steps:

# ------------------------------------------------------------
Expand Down
41 changes: 40 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,45 @@ help:
# --------------------------------------------------------------------------------------------------
# Lint Targets
# --------------------------------------------------------------------------------------------------
lint:
lint: _lint-files
lint: _lint-workflow

.PHONY: _lint-workflow
_lint-workflow:
@echo "################################################################################"
@echo "# Lint Workflow"
@echo "################################################################################"
@\
GIT_CURR_MAJOR="$$( git tag | sort -V | tail -1 | sed 's|\.[0-9]*$$||g' )"; \
GIT_CURR_MINOR="$$( git tag | sort -V | tail -1 | sed 's|^[0-9]*\.||g' )"; \
GIT_NEXT_TAG="$${GIT_CURR_MAJOR}.$$(( GIT_CURR_MINOR + 1 ))"; \
AVAILABLE_REFS="$$( \
grep 'refs:' -A 100 .github/workflows/nightly.yml \
| grep 'steps:' -B 100 \
| grep -E '[[:space:]]+\-' \
| sed 's/.*\s//g' \
| sed "s/'//g" \
| sed 's/"//g' \
| grep -v master || true \
)"; \
if [ -n "$${AVAILABLE_REFS}" ]; then \
if ! grep 'refs:' -A 100 .github/workflows/nightly.yml \
| grep " - '$${GIT_NEXT_TAG}'" >/dev/null; then \
echo "[ERR] New Tag required in .github/workflows/nightly.yml: $${GIT_NEXT_TAG}"; \
exit 1; \
else \
echo "[OK] Git Tag present in .github/workflows/nightly.yml: $${GIT_NEXT_TAG}"; \
fi \
else \
echo "[OK] No Tags defined at all in .github/workflows/nightly.yml"; \
fi
@echo

.PHONY: lint-files
_lint-files:
@echo "################################################################################"
@echo "# Lint Files"
@echo "################################################################################"
@docker run --rm -v $(CURRENT_DIR):/data cytopia/file-lint file-cr --text --ignore '.git/,.github/,tests/' --path .
@docker run --rm -v $(CURRENT_DIR):/data cytopia/file-lint file-crlf --text --ignore '.git/,.github/,tests/' --path .
@docker run --rm -v $(CURRENT_DIR):/data cytopia/file-lint file-trailing-single-newline --text --ignore '.git/,.github/,tests/' --path .
Expand Down Expand Up @@ -72,6 +110,7 @@ _test-version:
LATEST="$$( \
curl -L -sS https://github.com/PyCQA/pylint/releases/ \
| tac | tac \
| grep -Eo 'PyCQA/pylint/releases/tag/(pylint-)?[.0-9]+"' \
| grep -Eo "PyCQA/pylint/releases/tag/(pylint-)?[.0-9]+" \
| sed 's/.*tag\///g' \
| sort -u \
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
> [goimports][gimp-git-lnk] ****
> [golint][glint-git-lnk] ****
> [jsonlint][jlint-git-lnk] ****
> [kubeval][kubeval-git-lnk] ****
> [linkcheck][linkcheck-git-lnk] ****
> [mypy][mypy-git-lnk] ****
> [php-cs-fixer][pcsf-git-lnk] ****
Expand Down Expand Up @@ -56,10 +57,26 @@ The image is built nightly against multiple stable versions and pushed to Docker

## Available Docker image versions

#### Rolling releaess

The following Docker image tags are rolling releases and are built and updated every night.

[![nightly](https://github.com/cytopia/docker-pylint/workflows/nightly/badge.svg)](https://github.com/cytopia/docker-pylint/actions?query=workflow%3Anightly)

| Docker tag | Build from |
|------------|------------|
| `latest` | Latest stable pylint version |

#### Point in time releases

The following Docker image tags are built once and can be used for reproducible builds. Its version never changes so you will have to update tags in your pipelines from time to time in order to stay up-to-date.

[![build](https://github.com/cytopia/docker-pylint/workflows/build/badge.svg)](https://github.com/cytopia/docker-pylint/actions?query=workflow%3Abuild)

| Docker tag | Explanation |
|-----------------|-------------|
| `latest-<TAG>` | Latest stable version when this repository was git tagged |


## Docker mounts

Expand Down Expand Up @@ -92,6 +109,7 @@ linter below for reproducible local or remote CI tests:
| [golint][glint-git-lnk] | [![glint-hub-img]][glint-hub-lnk] | Go | Lint Go code |
| [eslint][elint-git-lnk] | [![elint-hub-img]][elint-hub-lnk] | Javascript | Lint Javascript code |
| [jsonlint][jlint-git-lnk] | [![jlint-hub-img]][jlint-hub-lnk] | JSON | Lint JSON files **<sup>[1]</sup>** |
| [kubeval][kubeval-git-lnk] | [![kubeval-hub-img]][kubeval-hub-lnk] | K8s | Lint Kubernetes files |
| [checkmake][cm-git-lnk] | [![cm-hub-img]][cm-hub-lnk] | Make | Lint Makefiles |
| [phpcbf][pcbf-git-lnk] | [![pcbf-hub-img]][pcbf-hub-lnk] | PHP | PHP Code Beautifier and Fixer |
| [phpcs][pcs-git-lnk] | [![pcs-hub-img]][pcs-hub-lnk] | PHP | PHP Code Sniffer |
Expand Down Expand Up @@ -135,6 +153,10 @@ linter below for reproducible local or remote CI tests:
[alint-hub-img]: https://img.shields.io/docker/pulls/cytopia/ansible-lint.svg
[alint-hub-lnk]: https://hub.docker.com/r/cytopia/ansible-lint

[kubeval-git-lnk]: https://github.com/cytopia/docker-kubeval
[kubeval-hub-img]: https://img.shields.io/docker/pulls/cytopia/kubeval.svg
[kubeval-hub-lnk]: https://hub.docker.com/r/cytopia/kubeval

[gfmt-git-lnk]: https://github.com/cytopia/docker-gofmt
[gfmt-hub-img]: https://img.shields.io/docker/pulls/cytopia/gofmt.svg
[gfmt-hub-lnk]: https://hub.docker.com/r/cytopia/gofmt
Expand Down

0 comments on commit 1cc5773

Please sign in to comment.