Skip to content

Commit

Permalink
Merge pull request #25 from matejkosiarcik/develop
Browse files Browse the repository at this point in the history
Automated PR
  • Loading branch information
mergify[bot] authored May 27, 2021
2 parents 67aabfa + 73255c9 commit 235c8cf
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## \[0.2.3\] - 2021-05-27

- Fixed
- dockerhub builds

## \[0.2.2\] - 2021-05-27

- Changed
Expand Down
28 changes: 28 additions & 0 deletions hooks/push
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
# Custom push hook for dockerhub
# When git tag like v1.2.3 appers
# This pushes docker tags :1, :1.2, :1.2.3, :latest

tag_original="$DOCKER_REPO:$DOCKER_TAG"
printf 'Original tag: %s\n' "$tag_original"
docker tag "$IMAGE_NAME" "$tag_original"
docker push "$tag_original"

if [ "$DOCKER_TAG" = 'dev' ]; then
exit 0
fi

tag_minor="$DOCKER_REPO:${DOCKER_TAG%.*}"
printf 'Minor tag: %s\n' "$tag_minor"
docker tag "$IMAGE_NAME" "$tag_minor"
docker push "$tag_minor"

tag_major="$DOCKER_REPO:${DOCKER_TAG%.*.*}"
printf 'Major tag: %s\n' "$tag_major"
docker tag "$IMAGE_NAME" "$tag_major"
docker push "$tag_major"

tag_latest="$DOCKER_REPO:latest"
printf 'Latest tag: %s\n' "$tag_latest"
docker tag "$IMAGE_NAME" "$tag_latest"
docker push "$tag_latest"
2 changes: 1 addition & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def main(argv: Optional[List[str]]):

# parse arguments
parser = argparse.ArgumentParser(prog="millipng")
parser.add_argument("-V", "--version", action="version", version="%(prog)s 0.2.2")
parser.add_argument("-V", "--version", action="version", version="%(prog)s 0.2.3")
parser.add_argument(
"-l",
"--level",
Expand Down

0 comments on commit 235c8cf

Please sign in to comment.