diff --git a/.github/workflows/cd-release.yml b/.github/workflows/cd-release.yml index 96bacd8..75e3563 100644 --- a/.github/workflows/cd-release.yml +++ b/.github/workflows/cd-release.yml @@ -20,9 +20,8 @@ jobs: - name: Validate version and branch run: | - BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) TAG_NAME=${{ github.ref_name }} - if [[ "$BRANCH_NAME" == "master" && ! "$TAG_NAME" =~ ^v3\. ]]; then + if [[ ! "$TAG_NAME" =~ ^v3\. ]]; then echo "Error: Tags on master branch must start with v3." exit 1 fi diff --git a/scripts/build.sh b/scripts/build.sh index 3b76cd7..a7db83a 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,7 +1,7 @@ #!/bin/bash DEFAULT_FILENAME="main" -CONTENT_DIR="./contents" +CONTENT_DIR="contents" show_usage() { echo "Usage:" @@ -14,16 +14,14 @@ show_usage() { single_compile() { local filename=$1 - mkdir -p build - cp -r $CONTENT_DIR build/ + mkdir -p build/$CONTENT_DIR xelatex -synctex=1 -interaction=nonstopmode -file-line-error -output-directory=build "$filename" || exit 1 echo "Single compilation completed successfully!" } full_compile() { local filename=$1 - mkdir -p build - cp -r $CONTENT_DIR build/ + mkdir -p build/$CONTENT_DIR xelatex -synctex=1 -interaction=nonstopmode -file-line-error -output-directory=build "$filename" || exit 1 bibtex "build/$filename" || exit 1 xelatex -synctex=1 -interaction=nonstopmode -file-line-error -output-directory=build "$filename" || exit 1