From f1992131600f1d7156b6355d5a3d8724a3e39526 Mon Sep 17 00:00:00 2001 From: ludeeus Date: Sat, 28 Jan 2023 20:35:29 +0000 Subject: [PATCH] Remove makefile --- .devcontainer.json | 4 ++-- .github/workflows/checks.yml | 4 ++-- Makefile | 22 ---------------------- scripts/{add => add_repository} | 0 scripts/{remove => remove_repository} | 2 +- scripts/setup | 3 +++ scripts/sort | 3 +++ 7 files changed, 11 insertions(+), 27 deletions(-) delete mode 100644 Makefile rename scripts/{add => add_repository} (100%) rename scripts/{remove => remove_repository} (69%) create mode 100755 scripts/setup create mode 100755 scripts/sort diff --git a/.devcontainer.json b/.devcontainer.json index 0ed64c7..73ab6e1 100644 --- a/.devcontainer.json +++ b/.devcontainer.json @@ -1,7 +1,7 @@ { "name": "hacs/default", - "image": "mcr.microsoft.com/vscode/devcontainers/python:0-3.10-bullseye", - "postCreateCommand": "python3 -m pip install -r requirements.txt", + "image": "mcr.microsoft.com/vscode/devcontainers/python:0-3.10", + "postCreateCommand": "scripts/setup", "context": ".", "extensions": [ "ms-python.python", diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 263933e..2df6985 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -83,7 +83,7 @@ jobs: path: /tmp/repositories - name: Install dependencies if needed - run: make init + run: scripts/setup - name: Run the check run: python3 -m scripts.check.owner @@ -98,7 +98,7 @@ jobs: uses: actions/checkout@v2 - name: Install dependencies if needed - run: make init + run: scripts/setup - name: Run the check run: python3 -m scripts.check.edits diff --git a/Makefile b/Makefile deleted file mode 100644 index c4f506a..0000000 --- a/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -.DEFAULT_GOAL := help - -help: ## Shows help message. - @printf "\033[1m%s\033[36m %s\033[32m %s\033[0m \n\n" "Development environment for" "HACS" "Default"; - @awk 'BEGIN {FS = ":.*##";} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m make %-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST); - @echo - -init: - python3 -m pip install setuptools wheel - python3 -m pip install -r requirements.txt - -add: ## Add a new repository to the default HACS list - @bash scripts/add; - -remove: ## Remove a repository to the default HACS list - @bash scripts/remove; - -update: ## Pull master from hacs/default - @ git pull upstream master; - -sort: ## Sort all files - python3 scripts/sort.py; \ No newline at end of file diff --git a/scripts/add b/scripts/add_repository similarity index 100% rename from scripts/add rename to scripts/add_repository diff --git a/scripts/remove b/scripts/remove_repository similarity index 69% rename from scripts/remove rename to scripts/remove_repository index 23aae3d..07104fb 100644 --- a/scripts/remove +++ b/scripts/remove_repository @@ -10,4 +10,4 @@ echo $reason echo $removal_type echo $link -python3 scripts/remove_repo.py "$repository" "$removal_type" "$reason" "$link" || exit 0 +python3 $(dirname "$0")/remove_repo.py "$repository" "$removal_type" "$reason" "$link" || exit 0 diff --git a/scripts/setup b/scripts/setup new file mode 100755 index 0000000..82bd9e9 --- /dev/null +++ b/scripts/setup @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +python3 -m pip install -r requirements.txt \ No newline at end of file diff --git a/scripts/sort b/scripts/sort new file mode 100755 index 0000000..5aac078 --- /dev/null +++ b/scripts/sort @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +python3 $(dirname "$0")/sort.py \ No newline at end of file