Skip to content

Commit

Permalink
ci: try with pwsh
Browse files Browse the repository at this point in the history
  • Loading branch information
stevana committed Nov 4, 2024
1 parent 0eaddc9 commit 89b825d
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@ GITHUB_ACTIONS ?= false

SPEX_GIT_COMMIT ?= $(shell git rev-parse HEAD)

# This default file is used for simulating GitHub actions outputs locally:
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/passing-information-between-jobs
GITHUB_OUTPUT ?= "$(TEMPDIR)/spex_github_output"

ifeq ($(findstring mingw64_nt,$(OS)),mingw64_nt)
GITHUB_OUTPUT := $(env:GITHUB_OUTPUT)
SHELL := pwsh.exe
else
# This default file is used for simulating GitHub actions outputs locally:
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/passing-information-between-jobs
GITHUB_OUTPUT ?= "$(TEMPDIR)/spex_github_output"
endif

ifeq ($(GITHUB_ACTIONS),true)
SPEX_BIN := "bin"
Expand All @@ -37,10 +43,6 @@ else
ENABLE_STATIC := ""
endif

ifeq ($(findstring mingw64_nt,$(OS)),mingw64_nt)
SHELL := bash.exe
endif

all: build-deps build test bump install release

dist-newstyle/cache/plan.json: cabal.project cabal.project.freeze spex.cabal
Expand Down Expand Up @@ -77,14 +79,15 @@ bump:
@echo "RELEASED_VERSION=$(RELEASED_VERSION)"
@echo "OS=$(OS)"
@echo "SHELL=$(SHELL)"
@echo "GITHUB_OUTPUT=$(GITHUB_OUTPUT)"
ifdef CABAL_VERSION
ifdef RELEASED_VERSION
ifneq ($(CABAL_VERSION),$(RELEASED_VERSION))
@echo "New version!"
# https://github.com/actions/runner/issues/2224
# https://stackoverflow.com/questions/74443940/value-not-set-using-github-output
#ifeq ($(findstring mingw64_nt,$(OS)),mingw64_nt)
# echo "new-version=$(CABAL_VERSION)" | Out-File -FilePath $$Env:GITHUB_OUTPUT -Encoding utf8 -Append
# echo "new-version=$(CABAL_VERSION)" >> $
#else
echo "new-version=$(CABAL_VERSION)" >> $(GITHUB_OUTPUT)
#endif
Expand Down

0 comments on commit 89b825d

Please sign in to comment.