-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: use BIC_OVERWRITE
when cp
ing static/ too
#21
Changes from all commits
8862f3b
cbdbfba
8603135
93a8950
6728f2d
6e4afe1
96be8de
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,15 +15,15 @@ on: | |
|
||
env: | ||
IMAGE_NAME: bic | ||
PANDOC_VERSION: 2.17.0.1 | ||
BATS_VERSION: 1.5.0 | ||
PANDOC_VERSION: 3.2.1 | ||
BATS_VERSION: 1.11.0 | ||
|
||
jobs: | ||
# Run tests. | ||
# See also https://docs.docker.com/docker-hub/builds/automated-testing/ | ||
test: | ||
# in sync with Dockerfile | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-24.04 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. forgot to bump this when I bumped the Dockerfile 🙃 |
||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -366,7 +366,12 @@ build_feed() { | |
build_static() { | ||
[[ ! -d "${SRC_DIR}"/static ]] && return | ||
log "Building /static -> /" | ||
cp -a "${SRC_DIR}"/static/. "${DEST_DIR}" | ||
# Archive by default | ||
local args=(-a) | ||
# And run interactively so as to not clobber files unless explicitly disabled | ||
[[ -z "${BIC_OVERWRITE:-}" ]] && args+=(-i) | ||
# shellcheck disable=SC2216 | ||
echo n | cp "${args[@]}" "${SRC_DIR}"/static/. "${DEST_DIR}" | ||
Comment on lines
+373
to
+374
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't love this, but wasn't able to immediately come up with another way to accomplish it https://www.shellcheck.net/wiki/SC2216 |
||
} | ||
|
||
build() { | ||
|
@@ -376,7 +381,7 @@ build() { | |
[[ "${SRC_DIR}" != "${__dir}" ]] && [[ -f "${SRC_DIR}"/.env ]] && src "${SRC_DIR}"/.env && log "Custom .env sourced" | ||
DEST_DIR="${SRC_DIR}/${BUILD_DIR:-build}" | ||
log "Using source directory: ${SRC_DIR}" | ||
[[ -n "${BIC_OVERWRITE:-}" ]] && set +o noclobber && log "Disabled 'noclobber' redirection overwrite protection" | ||
[[ -n "${BIC_OVERWRITE:-}" ]] && set +o noclobber && warn "Disabled overwrite protection" | ||
|
||
# File system: what's missing and do we need to bail? | ||
[[ -d "${SRC_DIR}"/pages && -f "${SRC_DIR}"/page.html ]] || warn "pages/ + page.html for pages" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{{body}}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{{body}}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Test | ||
|
||
post |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<p>static</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's been a couple years...