-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
101 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,7 @@ pandas==1.4.1 | |
numpy==1.22.2 | ||
requests==2.27.1 | ||
openpyxl | ||
ratelimit==2.2.1 | ||
ratelimit==2.2.1 | ||
mypy | ||
flake8 | ||
black |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[metadata] | ||
name = ozon3 | ||
version = 1.4.2 | ||
version = 1.4.3 | ||
author = Milind Sharma | ||
author_email = [email protected] | ||
description = A package to get air quality data using the WAQI API | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#!/usr/bin/bash | ||
|
||
# This script is used for automating the process of updating patch numbers. | ||
# Specifically, it updates the version number in setup.cfg (Line 3) and setup.py (Line 12 & 13) | ||
# You can provide the script with either major, minor or patch (Case sensitive) | ||
# Example usage: | ||
# If the current version is 1.4.0, running './updateVersion.sh major' will change | ||
# the current version to 2.0.0 | ||
|
||
if [ "$1" = "" ]; then | ||
echo "You must provide an argument for this script" | ||
echo "Your argument must be either major, minor or patch" | ||
echo "See version semantics for more" | ||
exit | ||
fi | ||
|
||
if [ "$1" != "major" ] && [ "$1" != "minor" ] && [ "$1" != "patch" ]; then | ||
echo "Incorrect argument provided" | ||
echo "Your argument must be either major, minor or patch (Case sensitive)" | ||
exit | ||
fi | ||
|
||
VERSION_STRING=$(cat setup.cfg | grep "version") | ||
|
||
IFS=' ' | ||
read -ra VERSION_STRING_ARR <<< $VERSION_STRING | ||
|
||
VERSION="${VERSION_STRING_ARR[@]:2:2}" | ||
|
||
echo "Current Version: $VERSION" | ||
|
||
IFS='.' | ||
|
||
read -ra VERSION_NUMBERS <<< $VERSION | ||
|
||
MAJOR=${VERSION_NUMBERS[@]::1} | ||
MINOR=${VERSION_NUMBERS[@]:1:1} | ||
PATCH=${VERSION_NUMBERS[@]:2:2} | ||
|
||
if [ "$1" = "major" ]; then | ||
PATCH="0" | ||
MINOR="0" | ||
MAJOR=$(( $MAJOR + 1)) | ||
fi | ||
|
||
if [ "$1" = "minor" ]; then | ||
PATCH="0" | ||
MINOR=$(( $MINOR + 1)) | ||
fi | ||
|
||
if [ "$1" = "patch" ]; then | ||
PATCH=$(( $PATCH + 1)) | ||
fi | ||
|
||
UPDATED_VERSION="${MAJOR}.${MINOR}.${PATCH}" | ||
|
||
echo "Updated Version: $UPDATED_VERSION" | ||
|
||
sed -i "s/version = ${VERSION}/version = ${UPDATED_VERSION}/" setup.cfg | ||
sed -i "s/^ version=\"${VERSION}\",/ version=\"${UPDATED_VERSION}\",/" setup.py | ||
sed -i "s/^ download_url=\"https:\/\/github.com\/Milind220\/Ozone\/archive\/refs\/tags\/v${VERSION}.tar.gz\",/ download_url=\"https:\/\/github.com\/Milind220\/Ozone\/archive\/refs\/tags\/v${UPDATED_VERSION}.tar.gz\",/" setup.py |