From 35e14f7198af0a9992e4df87e7f01988925b41ce Mon Sep 17 00:00:00 2001 From: Omar Nomad Date: Fri, 29 Mar 2024 05:01:35 +0000 Subject: [PATCH] Update GitHub workflows and Makefile --- .github/workflows/main.yml | 4 ++-- .github/workflows/ubuntu.yml | 4 +++- Makefile | 13 +++++++------ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1e27d04..d1435bc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,9 +2,9 @@ name: macOS on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] workflow_dispatch: diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 95e528f..3ef397f 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -6,12 +6,14 @@ on: pull_request: branches: [main] + workflow_dispatch: + jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Testing on ubuntu-latest + - name: Run run: | make all diff --git a/Makefile b/Makefile index 4be90b6..fdc627c 100644 --- a/Makefile +++ b/Makefile @@ -2,14 +2,15 @@ SHELL := /bin/bash .SILENT: clean venv fetch merge epub pdf -# Define OS-specific package manager and virtual environment activation command UNAME_S := $(shell uname -s) -ifeq ($(UNAME_S),Linux) - PKG_MANAGER := apt - VENV_ACTIVATE := . ./.venv/bin/activate +ifeq ($(UNAME_S),Darwin) +PKG_MANAGER := brew +VENV_ACTIVATE := source .venv/bin/activate +else ifeq ($(UNAME_S),Linux) +PKG_MANAGER := apt +VENV_ACTIVATE := . ./.venv/bin/activate else - PKG_MANAGER := brew - VENV_ACTIVATE := . ./.venv/bin/activate +$(error Unsupported operating system: $(UNAME_S)) endif all: dependencies clean venv fetch merge epub wordcount