Skip to content

Commit 4230c85

Browse files
committed
Fix xlsx handling in justfile / Fetch full history in CI
1 parent 3224fcf commit 4230c85

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/ci-pr.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ jobs:
4646
repository: ${{ github.event.pull_request.head.repo.full_name }}
4747
# Checkout the branch made in the fork.
4848
ref: ${{ github.head_ref }}
49+
# The full history is required for "voc4cat transform --prov-from-git" below.
50+
fetch-depth: 0
4951
# Be specific about keeping credentials (it is the default)
5052
persist-credentials: true
5153

justfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ check: _fake_actions_env
5353
[group('individual steps')]
5454
convert: _fake_actions_env
5555
# make a backup of the original file just in case
56-
@cp inbox-excel-vocabs/vocab_example.xlsx inbox-excel-vocabs/vocab_example.xlsx.backup
56+
@mkdir -p inbox-excel-vocabs/backup
57+
@cp inbox-excel-vocabs/*.xlsx inbox-excel-vocabs/backup
5758
@voc4cat convert --config _main_branch/idranges.toml --logfile outbox/voc4cat.log --outdir outbox inbox-excel-vocabs/
5859
@if [ -z "$(ls outbox/*.ttl 2>/dev/null)" ]; then \
5960
@echo "No ttl file in outbox. Building joined vocabulary ttl-file from individual ttl-files in vocabulary.\n" && \
@@ -62,7 +63,7 @@ convert: _fake_actions_env
6263

6364
#=== post-convert checks ===
6465
# Delete xlsx in outbox that may be present from former runs
65-
@rm -f outbox/vocab_example.xlsx
66+
@rm -f outbox/*.xlsx
6667
# check all ttl file(s) in outbox
6768
@voc4cat check --redundant-hierarchies --config _main_branch/idranges.toml --logfile outbox/voc4cat.log outbox/
6869
# check if vocabulary changes are allowed
@@ -76,7 +77,7 @@ docs:
7677
# Rebuild the xlsx file from the joined ttl file.
7778
[group('individual steps')]
7879
xlsx: _fake_actions_env
79-
@rm -f outbox/vocab_example.xlsx
80+
@rm -f outbox/*.xlsx
8081
@voc4cat convert --config _main_branch/idranges.toml --logfile outbox/voc4cat.log --template templates/default_sheets.xlsx outbox/
8182

8283
# Join individual ttl files in vocabularies/ to one turtle file in outbox/

0 commit comments

Comments
 (0)