Skip to content

Commit

Permalink
Update build
Browse files Browse the repository at this point in the history
  • Loading branch information
reijoh committed Mar 22, 2024
1 parent 20a454f commit 8ff0fe2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-manual.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
if: failure()
run: |
export PANDOC_VERSION=3.1.12
export CREATE_FREEZE_FILE=true
make alpine-freeze-file
- name: Publish freeze file on fail
Expand Down
17 changes: 5 additions & 12 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ usage ()
printf 'Options:\n'
printf ' -c: targeted pandoc commit, e.g. 2.9.2.1\n'
printf ' -d: directory\n'
printf ' -f: create freeze file\n'
printf ' -r: targeted image repository/flavor, e.g. core or latex\n'
printf ' -s: stack on which the image will be based\n'
printf ' -t: docker build target\n'
printf ' -v: increase verbosity\n'
}

create_freeze=
directory=.
pandoc_commit=main
repo=core
Expand Down Expand Up @@ -58,11 +56,6 @@ while [ $# -gt 0 ]; do
printf '\ttarget: %s\n' "$target"
shift 2
;;
(-f)
create_freeze='true'
printf '\tcreate freeze file: true\n'
shift
;;
(-v)
verbosity=$((verbosity + 1))
printf '\tverbosity: %s\n' "${verbosity}"
Expand All @@ -89,15 +82,15 @@ if [ "$pandoc_commit" = "main" ]; then
fi

# File containing the version table
version_table_file="${directory}/versions.md"
version_table_file="${directory}versions.md"
if [ ! -f "$version_table_file" ]; then
printf 'Version table not found: %s\n' "$version_table_file" >&2
exit 1
fi
printf '\tversion_table_file: %s\n' "${version_table_file}"

# File containing the default stack config
stack_table_file="${directory}/default-stack.md"
stack_table_file="${directory}default-stack.md"
if [ ! -f "$stack_table_file" ]; then
printf 'Stack table not found: %s\n' "$stack_table_file" >&2
exit 1
Expand All @@ -109,8 +102,8 @@ if [ -z "$pandoc_version_opts" ]; then
exit 1
fi

freeze_file="${directory}/${stack}/freeze/pandoc-$pandoc_commit.project.freeze"
if [ "$pandoc_commit" != "main" ] && [ ! -f "$freeze_file" ] && [ -z "$create_freeze" ]; then
freeze_file="${directory}${stack}/freeze/pandoc-$pandoc_commit.project.freeze"
if [ "$pandoc_commit" != "main" ] && [ ! -f "$freeze_file" ] && [ -z "$CREATE_FREEZE_FILE" ]; then
printf 'Freeze file not found: %s\n' "$freeze_file" >&2
exit 1
fi
Expand Down Expand Up @@ -225,7 +218,7 @@ case "$action" in
--build-arg texlive_version="${texlive_version}" \
--build-arg lua_version="${lua_version}" \
--target "${target}"\
-f "${directory}/${stack}/Dockerfile"\
-f "${directory}${stack}/Dockerfile"\
"${directory}"
;;
(*)
Expand Down

0 comments on commit 8ff0fe2

Please sign in to comment.