Skip to content

Commit

Permalink
locking to ensure AWS credentials in Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Cosentino committed Jan 3, 2024
1 parent 61654f8 commit add9d82
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: local
hooks:
- id: bump-version
name: bump the version
language: system
entry: ./tools/bump-version.bash
types: [python]

- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
require_serial: true

- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
language_version: python3.10.2
19 changes: 19 additions & 0 deletions release.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""THIS SOFTWARE IS PROVIDED AS IS.
Released under GNU General Public License:
<https://www.gnu.org/licenses/gpl-3.0.en.html>
USE IT AT YOUR OWN RISK.
VenvCtl is a python object to leverage virtual environments programmatically.
VenvCtl is a wrapper around virtualenv.
This module is part of VenvCtl: <https://pypi.org/project/venvctl/>.
The code is available on GitLab: <https://gitlab.com/hyperd/venvctl>.
"""
from __future__ import absolute_import, division, print_function

__metaclass__ = type # pylint: disable=invalid-name

__version__ = "v0.1.1"
__author__ = "F."
20 changes: 20 additions & 0 deletions tools/bump-version.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

# #######################################
# This script is used to bump the version of the bridge
# project. It will bump the version in the release.py
# file and commit the change.
# #######################################
bump_version() {
# Get the latest version tag
latest_version=$(git describe --tags --abbrev=0)

# Increment the last number in the version tag by 1
new_version=$(echo "$latest_version" | awk -F. -v OFS=. '{$NF = $NF + 1;} 1' | sed 's/ /./g')

# Replace the version number in release.py with the new version number
sed -i '' 's/__version__ = .*/__version__ = "'"$new_version"'"/' release.py
}

# bump_version && git add bridge/release.py README.md
bump_version

0 comments on commit add9d82

Please sign in to comment.