]> gitweb.fluxo.info Git - bookup.git/commitdiff
Fix: apply fixes to the frontmatter citation mechanism 0.3.1
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 18 Nov 2025 16:16:10 +0000 (13:16 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 18 Nov 2025 16:16:10 +0000 (13:16 -0300)
ChangeLog.md
bin/archive
bin/compile-book
structure/book/en/00-preamble.md
structure/book/pt-br/00-preamble.md

index f2269eefe950038784d87cb067bdec97bfef91b8..b14e82b79d115280223c11bfeb448da83356a73f 100644 (file)
@@ -1,5 +1,9 @@
 # ChangeLog
 
+## v0.3.1 - 2025-11-18
+
+* [x] Apply fixes to the frontmatter citation mechanism.
+
 ## v0.3.0 - 2025-11-18
 
 * [x] Citation:
index ca0b610fe6931d8e489be8dd1c0e01df0185fe5d..d79d411c8d21cea3c56f6089eac034777999f92b 100755 (executable)
@@ -52,10 +52,6 @@ fi
 
 # Check if the revision is a tag
 if git tag | grep -q "^${REVISION}$"; then
-  # Save info on the latest tagged release
-  mkdir -p $METADATA
-  echo $REVISION > $LATEST
-
   # Check if archive does not exists
   if [ ! -d "$ARCHIVE/$REVISION" ]; then
     echo "# $BASENAME: archiving $REVISION..."
index e68a36ddfc15ea8f4804392606ee79082c05951a..eaf7a11e24b09270ac56d1eacfe52df804442e52 100755 (executable)
@@ -12,6 +12,8 @@ OUTPUT="${1:-book}"
 REVISION="$2"
 DATE="$3"
 LANG="`grep lang _common.yml _book.yml _notes.yml 2> /dev/null | tail -1 | cut -d : -f 3 | sed -e 's/"//g' -e 's/ //g'`"
+METADATA=".metadata"
+LATEST="$METADATA/latest.txt"
 
 # Set the language
 if [ -z "$LANG" ]; then
@@ -74,3 +76,10 @@ fi
 
 # Symlink as a Bookdown source
 ln -sf $OUTPUT.md $OUTPUT.Rmd
+
+# Check if the revision is a tag
+if git tag | grep -q "^${REVISION}$"; then
+  # Save info on the latest tagged release
+  mkdir -p $METADATA
+  echo $REVISION > $LATEST
+fi
index 5bb4c1322fc29e4b3fc86e4b5b3cf454d6bdb152..6d26c75fe46f62bae142634f9c077bbff3309f57 100644 (file)
@@ -47,7 +47,7 @@ if (knitr::is_html_output()) {
   author_cite = paste(toupper(author[2]), author[1], sep=', ')
   version     = readLines('.metadata/latest.txt')
   if (version != '0.0.0') {
-    archive = version
+    archive = paste('archive', version, sep='/')
   }
   else {
     archive = ''
index 8602f0be178ff163ba4d439323d203b8ba9b1402..6bb41326162c17211a20953d49ae0eeec05abdff 100644 (file)
@@ -48,7 +48,7 @@ if (knitr::is_html_output()) {
   author_cite = paste(toupper(author[2]), author[1], sep=', ')
   version     = readLines('.metadata/latest.txt')
   if (version != '0.0.0') {
-    archive = version
+    archive = paste('archive', version, sep='/')
   }
   else {
     archive = ''