Skip to content

Commit

Permalink
Using KamaalPy
Browse files Browse the repository at this point in the history
  • Loading branch information
kamaal111 committed Aug 13, 2023
1 parent be6f909 commit 89e2d18
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 98 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ jobs:
- name: Check if tag exists
run: just check-if-tag-exists

- name: Bump version
run: just bump-version

- name: Check if no diffs
run: just assert-has-no-diffs

deploy:
name: Deploy
timeout-minutes: 10
Expand Down
24 changes: 0 additions & 24 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,6 @@ install-deps:
. .venv/bin/activate
pip install -r requirements.txt

bump-version:
#!/bin/bash

. .venv/bin/activate
. scripts/utils.bash

new_release_tag=$(extract_tag_from_release_branch)
python scripts/bump_version.py $new_release_tag

assert-has-no-diffs:
#!/bin/bash

current_branch=$(git symbolic-ref --short HEAD)
diffs=$(git diff --name-only "origin/$current_branch" | sed '/^$/d' | awk '{print NR}'| sort -nr | sed -n '1p')
just assert-empty "$diffs"

check-if-tag-exists:
#!/bin/bash

Expand All @@ -75,11 +59,3 @@ check-if-tag-exists:
exit 69
fi
done

[private]
assert-empty value:
#!/bin/bash

. .venv/bin/activate

python scripts/asserts/empty.py "{{ value }}"
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ xctools = "xctools_kamaalio:cli.cli"

[project]
name = "xctools_kamaalio"
version = "0.0.8"
version = "0.1.0"
authors = [{ name = "Kamaal Farah", email = "[email protected]" }]
description = "A package to help deal with Xcode projects."
readme = "README.md"
Expand All @@ -19,7 +19,7 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = ["click >= 8.1.6"]
dependencies = ["click >= 8.1.6", "kamaalpy >= 0.1.0"]


[project.urls]
Expand Down
2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
build==0.10.0
click==8.1.6
packaging==23.1
tomli_w==1.0.0
twine==4.0.2
6 changes: 0 additions & 6 deletions scripts/asserts/empty.py

This file was deleted.

29 changes: 0 additions & 29 deletions scripts/bump_version.py

This file was deleted.

3 changes: 2 additions & 1 deletion src/xctools_kamaalio/cli.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import sys

from xctools_kamaalio.list_utils import removed, find_index
from kamaaalpy.lists import removed, find_index

from xctools_kamaalio.actions.upload import upload
from xctools_kamaalio.actions.archive import archive
from xctools_kamaalio.actions.bump_version import bump_version
Expand Down
20 changes: 0 additions & 20 deletions src/xctools_kamaalio/list_utils.py

This file was deleted.

9 changes: 1 addition & 8 deletions src/xctools_kamaalio/project_updater.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
from pathlib import Path
from typing import Any


def omit_empty(dict_to_update: dict[str, Any]):
new_dict = {}
for key, value in dict_to_update.items():
if value:
new_dict[key] = value
return new_dict
from kamaaalpy.dicts import omit_empty


class ProjectUpdater:
Expand Down

0 comments on commit 89e2d18

Please sign in to comment.