From ee03528432a8bfb04ebb296903fafe4476f0b16c Mon Sep 17 00:00:00 2001 From: Victor Machado Date: Mon, 3 Jun 2024 17:50:27 +0200 Subject: [PATCH 01/23] debugging froster update --- froster/froster.py | 4 +++- install.sh | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/froster/froster.py b/froster/froster.py index 0c87949..67eb235 100755 --- a/froster/froster.py +++ b/froster/froster.py @@ -6419,7 +6419,9 @@ def subcmd_update(self): if self.args.rclone: cmd = "rclone selfupdate" else: - cmd = "curl -s https://raw.githubusercontent.com/dirkpetersen/froster/main/install.sh?$(date +%s) | bash" + cmd = "curl -s https://raw.githubusercontent.com/hpcnow/froster/main/install.sh?$(date +%s) | bash" + + print(f'\n Executing command "{cmd}"\n') p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True) diff --git a/install.sh b/install.sh index 9fefa2a..e65ce0f 100755 --- a/install.sh +++ b/install.sh @@ -205,8 +205,7 @@ backup_old_installation() { fi if pipx list | grep froster >/dev/null 2>&1; then - pipx uninstall froster & - spinner $! + pipx uninstall froster fi echo "...froster uninstalled" From 8915a638962bce575ddb94595f811899049a10a8 Mon Sep 17 00:00:00 2001 From: Victor Machado Date: Mon, 3 Jun 2024 17:52:32 +0200 Subject: [PATCH 02/23] dgb froster update --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index e65ce0f..d355b2c 100755 --- a/install.sh +++ b/install.sh @@ -206,6 +206,7 @@ backup_old_installation() { if pipx list | grep froster >/dev/null 2>&1; then pipx uninstall froster + echo "pipx uninstall froster returned: " $? fi echo "...froster uninstalled" From e0079943c584f2f99ed939248ec32411a30abc8b Mon Sep 17 00:00:00 2001 From: Victor Machado Date: Mon, 3 Jun 2024 17:54:09 +0200 Subject: [PATCH 03/23] dbg update --- install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install.sh b/install.sh index d355b2c..af57cdc 100755 --- a/install.sh +++ b/install.sh @@ -249,8 +249,10 @@ install_froster() { echo echo "Installing latest version of froster from \"$REPO@$BRANCH\"..." + echo "here fails?" pipx install git+$REPO@$BRANCH >/dev/null 2>&1 & spinner $! + echo "here arrives?" # Keep the config.ini file (if any) if [[ -f ${XDG_CONFIG_HOME}/froster_${date_YYYYMMDDHHMMSS}.bak/config.ini ]]; then From 056af1c142768626ea12b4f607e82fbff1b31950 Mon Sep 17 00:00:00 2001 From: Victor Machado Date: Mon, 3 Jun 2024 17:56:21 +0200 Subject: [PATCH 04/23] dgb update --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index af57cdc..e90271c 100755 --- a/install.sh +++ b/install.sh @@ -230,10 +230,10 @@ backup_old_installation() { } install_froster() { - + echo "ahá" # Ensure ~/.local/bin is in the PATH pipx ensurepath >/dev/null 2>&1 - + echo "uhú" # TODO: Update path once froster is in PyPi repository # Get the repository and branch from the github environment variables (if any) From 348937e21b203a1c4d5b4fb7a019e6e3aad5fa6f Mon Sep 17 00:00:00 2001 From: Victor Machado Date: Mon, 3 Jun 2024 18:00:23 +0200 Subject: [PATCH 05/23] Avoid exiting script if no real fail in pipx uninstall command --- install.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index e90271c..4341440 100755 --- a/install.sh +++ b/install.sh @@ -205,8 +205,12 @@ backup_old_installation() { fi if pipx list | grep froster >/dev/null 2>&1; then - pipx uninstall froster - echo "pipx uninstall froster returned: " $? + # If froster is installed with pipx, uninstall it and ignore errors + # sometime pipx uninstall fails with error code 1 if PIPX_HOME is set, but froster is still uninstalled + set +e + pipx uninstall froster >/dev/null 2>&1 & + spinner $! + set -e fi echo "...froster uninstalled" @@ -230,10 +234,10 @@ backup_old_installation() { } install_froster() { - echo "ahá" + # Ensure ~/.local/bin is in the PATH pipx ensurepath >/dev/null 2>&1 - echo "uhú" + # TODO: Update path once froster is in PyPi repository # Get the repository and branch from the github environment variables (if any) @@ -249,10 +253,8 @@ install_froster() { echo echo "Installing latest version of froster from \"$REPO@$BRANCH\"..." - echo "here fails?" pipx install git+$REPO@$BRANCH >/dev/null 2>&1 & spinner $! - echo "here arrives?" # Keep the config.ini file (if any) if [[ -f ${XDG_CONFIG_HOME}/froster_${date_YYYYMMDDHHMMSS}.bak/config.ini ]]; then From 290888aa16a59ab8e93844167ce22cb6b069b1ef Mon Sep 17 00:00:00 2001 From: Victor Machado Date: Mon, 3 Jun 2024 18:03:35 +0200 Subject: [PATCH 06/23] dgb froster update --- install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 4341440..310491d 100755 --- a/install.sh +++ b/install.sh @@ -208,8 +208,7 @@ backup_old_installation() { # If froster is installed with pipx, uninstall it and ignore errors # sometime pipx uninstall fails with error code 1 if PIPX_HOME is set, but froster is still uninstalled set +e - pipx uninstall froster >/dev/null 2>&1 & - spinner $! + pipx uninstall froster -vvv set -e fi From 3d78895e08eb9ab7d59d97d78286b8c5b3c7f883 Mon Sep 17 00:00:00 2001 From: Victor Machado Date: Mon, 3 Jun 2024 18:06:01 +0200 Subject: [PATCH 07/23] degub update --- install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install.sh b/install.sh index 310491d..ff7e188 100755 --- a/install.sh +++ b/install.sh @@ -387,6 +387,9 @@ check_apt_dependencies # Set rw permissions on anyone in file's group umask 0002 +echo $REPO +echo $BRANCH + # Backup old installation (if any) backup_old_installation From 92c82a4e177f2e780f90ee395803d1ab60736532 Mon Sep 17 00:00:00 2001 From: Victor Machado Date: Mon, 3 Jun 2024 18:12:57 +0200 Subject: [PATCH 08/23] Delete froster update command --- froster/froster.py | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/froster/froster.py b/froster/froster.py index 67eb235..e789f6a 100755 --- a/froster/froster.py +++ b/froster/froster.py @@ -6412,32 +6412,6 @@ def subcmd_credentials(self, cfg: ConfigManager, aws: AWSBoto): print(' ...AWS credentials are NOT valid\n') return False - def subcmd_update(self): - '''Update Froster''' - - try: - if self.args.rclone: - cmd = "rclone selfupdate" - else: - cmd = "curl -s https://raw.githubusercontent.com/hpcnow/froster/main/install.sh?$(date +%s) | bash" - - print(f'\n Executing command "{cmd}"\n') - - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, shell=True) - - for line in iter(p.stdout.readline, b''): - print(line.decode(), end='') - - # Wait for the process to finish and get the exit code - p.wait() - - if p.returncode != 0: - print( - f"Error: The update failed with exit code {p.returncode}.") - except Exception: - print_error() - def parse_arguments(self): '''Gather and parse command-line arguments''' @@ -6886,8 +6860,6 @@ def main(): cmd.subcmd_ssh(cfg, aws) elif args.subcmd in ['credentials', 'crd']: cmd.subcmd_credentials(cfg, aws) - elif args.subcmd in ['update', 'upd']: - cmd.subcmd_update() else: cmd.print_help() From 3637d2801bfed1b3f1319f5f2aaa0bac18d7721a Mon Sep 17 00:00:00 2001 From: Victor Machado Date: Mon, 3 Jun 2024 18:28:55 +0200 Subject: [PATCH 09/23] Update python publish action --- .github/workflows/python-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 4493f23..ce9e241 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -37,7 +37,7 @@ jobs: python -m pip install --upgrade pip pip install build - name: Build package - run: python -m build + run: python setup.py sdist bdist_wheel - name: Publish package uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 with: From bec26f59cf49ba99870a3cf30ae1698a5df88161 Mon Sep 17 00:00:00 2001 From: Victor Machado Date: Mon, 3 Jun 2024 18:31:03 +0200 Subject: [PATCH 10/23] Install setuptools in publish GA --- .github/workflows/python-publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index ce9e241..a5f3762 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -36,6 +36,7 @@ jobs: run: | python -m pip install --upgrade pip pip install build + pip install setuptools - name: Build package run: python setup.py sdist bdist_wheel - name: Publish package From d9fe6fe88ec3a5dfa5e2547ac0c030a3d8fb2b80 Mon Sep 17 00:00:00 2001 From: Victor Machado Date: Mon, 3 Jun 2024 18:42:05 +0200 Subject: [PATCH 11/23] using pyproject.toml and update github actions --- .github/workflows/python-publish.yml | 3 +-- pyproject.toml | 24 ++++++++++++++++++++++++ requirements.txt | 7 ------- setup.py | 23 ----------------------- 4 files changed, 25 insertions(+), 32 deletions(-) create mode 100644 pyproject.toml delete mode 100644 requirements.txt delete mode 100644 setup.py diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index a5f3762..4493f23 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -36,9 +36,8 @@ jobs: run: | python -m pip install --upgrade pip pip install build - pip install setuptools - name: Build package - run: python setup.py sdist bdist_wheel + run: python -m build - name: Publish package uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 with: diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..9bc1f6e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,24 @@ +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" + +[tool.poetry] +name = "froster" +version = "0.11.3" +description = "Add your project description here" +authors = ["Victor Machado "] +readme = "README.md" +license = "MIT" + +[tool.poetry.dependencies] +python = "^3.6" +boto3 = "^1.34.104" +duckdb = "^0.10.2" +inquirer = "^3.2.4" +psutil = "^5.9.0" +requests = "^2.31.0" +textual = "^0.59.0" +visidata = "^3.0.2" + +[tool.poetry.scripts] +froster = "froster.froster:main" diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index bbd06eb..0000000 --- a/requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -boto3==1.34.104 -duckdb==0.10.2 -inquirer==3.2.4 -psutil==5.9.0 -requests==2.31.0 -textual==0.59.0 -visidata==3.0.2 \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index 97634ba..0000000 --- a/setup.py +++ /dev/null @@ -1,23 +0,0 @@ -from setuptools import setup, find_packages - -with open('README.md', 'r') as f: - long_description = f.read() - -with open('requirements.txt') as f: - requirements = f.read().splitlines() - - -setup( - name='froster', - version='0.11.3', - license='MIT', - packages=find_packages(), - install_requires=requirements, - entry_points={ - 'console_scripts': [ - 'froster = froster.froster:main' - ] - }, - long_description=long_description, - long_description_content_type='text/markdown', -) From b60b41d0dfe3dbef865631a56563a8bb9a2de490 Mon Sep 17 00:00:00 2001 From: Victor Machado Date: Mon, 3 Jun 2024 18:47:25 +0200 Subject: [PATCH 12/23] Update installation method to pypi --- install.sh | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/install.sh b/install.sh index ff7e188..3a4bee7 100755 --- a/install.sh +++ b/install.sh @@ -237,22 +237,8 @@ install_froster() { # Ensure ~/.local/bin is in the PATH pipx ensurepath >/dev/null 2>&1 - # TODO: Update path once froster is in PyPi repository - - # Get the repository and branch from the github environment variables (if any) - # or set the default repository and branch - if [[ -v REPO ]]; then - REPO="https://github.com/$REPO" - else - REPO="https://github.com/dirkpetersen/froster.git" - fi - - BRANCH=${BRANCH:-"main"} - - echo - echo "Installing latest version of froster from \"$REPO@$BRANCH\"..." - - pipx install git+$REPO@$BRANCH >/dev/null 2>&1 & + # Install froster from PyPi package repository + pipx install froster >/dev/null 2>&1 & spinner $! # Keep the config.ini file (if any) From 416bd1a0c199408c2579962738bafdea9d124200 Mon Sep 17 00:00:00 2001 From: Victor Machado Date: Mon, 3 Jun 2024 18:49:48 +0200 Subject: [PATCH 13/23] Cleaning install.sh --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 3a4bee7..e923557 100755 --- a/install.sh +++ b/install.sh @@ -237,6 +237,9 @@ install_froster() { # Ensure ~/.local/bin is in the PATH pipx ensurepath >/dev/null 2>&1 + echo + echo "Installing latest version of froster..." + # Install froster from PyPi package repository pipx install froster >/dev/null 2>&1 & spinner $! @@ -373,9 +376,6 @@ check_apt_dependencies # Set rw permissions on anyone in file's group umask 0002 -echo $REPO -echo $BRANCH - # Backup old installation (if any) backup_old_installation From e6e18a8a6f05cae1f20173455aa658f7b48f1af3 Mon Sep 17 00:00:00 2001 From: Victor Machado Date: Tue, 4 Jun 2024 11:22:28 +0200 Subject: [PATCH 14/23] check for credentials when connecting to AWS S3 --- froster/froster.py | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/froster/froster.py b/froster/froster.py index e789f6a..6168149 100755 --- a/froster/froster.py +++ b/froster/froster.py @@ -6147,7 +6147,7 @@ def subcmd_index(self, cfg: ConfigManager, arch: Archiver): except Exception: print_error() - def subcmd_archive(self, arch: Archiver): + def subcmd_archive(self, arch: Archiver, aws: AWSBoto): '''Check command for archiving folders for Froster.''' try: @@ -6174,6 +6174,10 @@ def subcmd_archive(self, arch: Archiver): arch.reset_folder(folder, self.args.recursive) return + if not aws.check_credentials(): + print('\nError: invalid credentials. Check the AWS configuration with "froster config --aws"\n') + sys.exit(1) + # Check if the user provided the hotspots argument if self.args.hotspots: if self.args.folders: @@ -6200,6 +6204,10 @@ def subcmd_restore(self, arch: Archiver, aws: AWSBoto): '''Check command for restoring folders for Froster.''' try: + if not aws.check_credentials(): + print('\nError: invalid credentials. Check the AWS configuration with "froster config --aws"\n') + sys.exit(1) + if self.args.monitor: # aws inactivity and cost monitoring aws.monitor_ec2() @@ -6235,10 +6243,14 @@ def subcmd_restore(self, arch: Archiver, aws: AWSBoto): except Exception: print_error() - def subcmd_delete(self, arch: Archiver): + def subcmd_delete(self, arch: Archiver, aws: AWSBoto): '''Check command for deleting folders for Froster.''' try: + if not aws.check_credentials(): + print('\nError: invalid credentials. Check the AWS configuration with "froster config --aws"\n') + sys.exit(1) + if not self.args.folders: # Get the list of folders from the archive @@ -6269,9 +6281,13 @@ def subcmd_delete(self, arch: Archiver): except Exception: print_error() - def subcmd_mount(self, arch: Archiver): + def subcmd_mount(self, arch: Archiver, aws: AWSBoto): try: + if not aws.check_credentials(): + print('\nError: invalid credentials. Check the AWS configuration with "froster config --aws"\n') + sys.exit(1) + if self.args.list: arch.print_current_mounts() return @@ -6847,15 +6863,15 @@ def main(): elif args.subcmd in ['index', 'ind']: cmd.subcmd_index(cfg, arch) elif args.subcmd in ['archive', 'arc']: - cmd.subcmd_archive(arch) + cmd.subcmd_archive(arch, aws) elif args.subcmd in ['restore', 'rst']: cmd.subcmd_restore(arch, aws) elif args.subcmd in ['delete', 'del']: - cmd.subcmd_delete(arch) + cmd.subcmd_delete(arch, aws) elif args.subcmd in ['mount', 'mnt']: - cmd.subcmd_mount(arch) + cmd.subcmd_mount(arch, aws) elif args.subcmd in ['umount']: - cmd.subcmd_umount(arch) + cmd.subcmd_umount(arch, aws) elif args.subcmd in ['ssh', 'scp']: cmd.subcmd_ssh(cfg, aws) elif args.subcmd in ['credentials', 'crd']: From 5a3c074940aceb3b9927a0cf6eb744f2b9b4eae4 Mon Sep 17 00:00:00 2001 From: Victor Machado Date: Tue, 4 Jun 2024 11:22:42 +0200 Subject: [PATCH 15/23] upd version to v0.11.4 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9bc1f6e..3015b1b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "froster" -version = "0.11.3" +version = "0.11.4" description = "Add your project description here" authors = ["Victor Machado "] readme = "README.md" From 522717a79cd71658bb8e5cddb7d165ef07c32aef Mon Sep 17 00:00:00 2001 From: Victor Machado Date: Tue, 4 Jun 2024 12:07:18 +0200 Subject: [PATCH 16/23] froster update version check system --- froster/froster.py | 71 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/froster/froster.py b/froster/froster.py index 6168149..f33cc2d 100755 --- a/froster/froster.py +++ b/froster/froster.py @@ -177,6 +177,10 @@ def __init__(self): if self.aws_profile and self.aws_region: self.aws_init = True + # Last timestamp we checked for an updated + self.update_check_timestamp = config.get( + 'UPDATE', 'timestamp', fallback=None) + # Shared configuration self.is_shared = config.getboolean( 'SHARED', 'is_shared', fallback=False) @@ -254,6 +258,7 @@ def __init__(self): if self.user_init and self.aws_init and self.s3_init and self.nih_init: self.configuration_done = True + except Exception: print_error() @@ -1197,6 +1202,27 @@ def set_slurm(self, args): print_error() return False + def check_update(self): + '''Set the update check''' + + try: + timestamp = time.time() + + if hasattr(self, 'update_check_timestamp') and self.update_check_timestamp is not None: + # Check if last day was less than 86400 * 7 = (1 day) * 7 = 1 week + if timestamp - self.update_check_timestamp < (86400*7): + # Less than a week since last check + return False + + # Set the update check flag in the config file + self.__set_configuration_entry( + 'UPDATE', 'update_check_timestamp', timestamp) + return True + + except Exception: + print_error() + return False + class AWSBoto: '''AWS handler class. This class is used to interact with AWS services.''' @@ -6428,6 +6454,44 @@ def subcmd_credentials(self, cfg: ConfigManager, aws: AWSBoto): print(' ...AWS credentials are NOT valid\n') return False + def subcmd_update(self): + '''Check if an update is available''' + try: + + cmd = "curl -s https://api.github.com/repos/dirkpetersen/froster/releases" + + result = subprocess.run(cmd, shell=True, text=True, + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + + if result.returncode != 0: + print(f"Error checking if froster update available. Command run: {cmd}: {result.stderr.strip()}") + return False + + def compare_versions(version1, version2): + v1 = [int(v) for v in version1.split(".")] + v2 = [int(v) for v in version2.split(".")] + + for i in range(max(len(v1), len(v2))): + v1_part = v1[i] if i < len(v1) else 0 + v2_part = v2[i] if i < len(v2) else 0 + if v1_part != v2_part: + return v1_part - v2_part + return 0 + + releases = json.loads(result.stdout) + latest = releases[0]['tag_name'].replace('v', '') + current = pkg_resources.get_distribution("froster").version + + if compare_versions(latest, current) > 0: + print(f'\nA froster update is available: froster v{latest}') + print(f'You can update froster using the command:') + print(f' curl -s https://raw.githubusercontent.com/dirkpetersen/froster/main/install.sh?$(date +%s) | bash\n') + else: + print(f'\nFroster is up to date: froster v{current}\n') + + except Exception: + print_error() + def parse_arguments(self): '''Gather and parse command-line arguments''' @@ -6876,9 +6940,16 @@ def main(): cmd.subcmd_ssh(cfg, aws) elif args.subcmd in ['credentials', 'crd']: cmd.subcmd_credentials(cfg, aws) + elif args.subcmd in ['update', 'upd']: + cmd.subcmd_update(cfg) else: cmd.print_help() + # Check if there are updates on froster every X days + if cfg.check_update(): + cmd.subcmd_update(cfg) + + # Close the AWS session aws.close_session() except Exception: From eaf145138f8fd0e2a03c1fbaef2461ef4d295fb4 Mon Sep 17 00:00:00 2001 From: Victor Machado Date: Tue, 4 Jun 2024 12:28:57 +0200 Subject: [PATCH 17/23] Publish new froster package in pypi when new release released --- .github/workflows/python-publish.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 4493f23..f55fffe 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -9,14 +9,8 @@ name: Upload Python Package on: - workflow_dispatch: - inputs: - logLevel: - description: 'Log level' - required: true - default: 'warning' - tags: - description: 'Test scenario tags' + release: + types: [created] permissions: contents: read From cf34f50dcfe5a5f4eb5a8033eb35c279e34df459 Mon Sep 17 00:00:00 2001 From: Victor Machado Date: Tue, 4 Jun 2024 12:29:23 +0200 Subject: [PATCH 18/23] upd version to v.0.11.5 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3015b1b..9dc8522 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "froster" -version = "0.11.4" +version = "0.11.5" description = "Add your project description here" authors = ["Victor Machado "] readme = "README.md" From 0e46bc88beb14635bea6ce7b2946392df6d0ec0d Mon Sep 17 00:00:00 2001 From: Victor Machado Date: Tue, 4 Jun 2024 12:35:44 +0200 Subject: [PATCH 19/23] upd version to v0.11.6 --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9dc8522..c7c90f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,8 +4,8 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "froster" -version = "0.11.5" -description = "Add your project description here" +version = "0.11.6" +description = "Froster is a tool for easy data transfer between local file systems and AWS S3 storage." authors = ["Victor Machado "] readme = "README.md" license = "MIT" From 34f4aee69f1d7498c8fdef7c14e86f872d9cee5e Mon Sep 17 00:00:00 2001 From: Victor Machado Date: Tue, 4 Jun 2024 12:38:10 +0200 Subject: [PATCH 20/23] bugfix in froster update cmd --- froster/froster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/froster/froster.py b/froster/froster.py index f33cc2d..58408bc 100755 --- a/froster/froster.py +++ b/froster/froster.py @@ -6941,7 +6941,7 @@ def main(): elif args.subcmd in ['credentials', 'crd']: cmd.subcmd_credentials(cfg, aws) elif args.subcmd in ['update', 'upd']: - cmd.subcmd_update(cfg) + cmd.subcmd_update() else: cmd.print_help() From f5c8d79a9e9e4d8a462c513b11b883041af5552d Mon Sep 17 00:00:00 2001 From: Victor Machado Date: Tue, 4 Jun 2024 12:38:19 +0200 Subject: [PATCH 21/23] less verbose when uninstalling froster --- install.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/install.sh b/install.sh index e923557..a403a11 100755 --- a/install.sh +++ b/install.sh @@ -207,9 +207,7 @@ backup_old_installation() { if pipx list | grep froster >/dev/null 2>&1; then # If froster is installed with pipx, uninstall it and ignore errors # sometime pipx uninstall fails with error code 1 if PIPX_HOME is set, but froster is still uninstalled - set +e - pipx uninstall froster -vvv - set -e + pipx uninstall froster fi echo "...froster uninstalled" From 3af94840b2e63dfdce54f9d1190bac04506566cc Mon Sep 17 00:00:00 2001 From: Victor Machado Date: Tue, 4 Jun 2024 12:39:07 +0200 Subject: [PATCH 22/23] froster v0.11.7 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c7c90f7..6a53168 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "froster" -version = "0.11.6" +version = "0.11.7" description = "Froster is a tool for easy data transfer between local file systems and AWS S3 storage." authors = ["Victor Machado "] readme = "README.md" From da328ae46574f36a1f2cf70edfccd859e5962dae Mon Sep 17 00:00:00 2001 From: Victor Machado Date: Tue, 4 Jun 2024 12:44:16 +0200 Subject: [PATCH 23/23] less verbose when uninstalling froster --- install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index a403a11..31a9de5 100755 --- a/install.sh +++ b/install.sh @@ -207,7 +207,8 @@ backup_old_installation() { if pipx list | grep froster >/dev/null 2>&1; then # If froster is installed with pipx, uninstall it and ignore errors # sometime pipx uninstall fails with error code 1 if PIPX_HOME is set, but froster is still uninstalled - pipx uninstall froster + pipx uninstall froster >/dev/null 2>&1 & + spinner $! fi echo "...froster uninstalled"