Skip to content

Commit 1132098

Browse files
committed
fix the tarball using the wrong internal folder structure, fix the script responsible for creating it
1 parent 5a244b5 commit 1132098

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

_src/create_versioned_tarball.sh

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
#!/bin/bash
22

33
# Create a tar.xz archive of _site, excluding versions.js and versions.json,
4-
# and store it as _versioned/new.tar.xz.
4+
# and store it as _versioned/<version>.tar.xz with contents in a <version>/ folder.
5+
# Usage: ./create_versioned_tarball.sh <version>
6+
7+
if [ -z "$1" ]; then
8+
echo "Error: Version argument required"
9+
echo "Usage: $0 <version>"
10+
exit 1
11+
fi
12+
13+
VERSION="$1"
514

615
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
716
REPO_ROOT="$(dirname "$SCRIPT_DIR")"
817

918
SITE_DIR="$REPO_ROOT/_site"
10-
OUTPUT="$REPO_ROOT/_versioned/new.tar.xz"
19+
OUTPUT="$REPO_ROOT/_versioned/${VERSION}.tar.xz"
1120

1221
mkdir -p "$(dirname "$OUTPUT")"
1322

@@ -18,7 +27,8 @@ tar \
1827
--exclude="versions.js" \
1928
--exclude="versions.json" \
2029
--exclude="_versioned" \
30+
--transform "s|^\\.|${VERSION}|" \
2131
--directory "$SITE_DIR" \
2232
.
2333

24-
echo "Created $OUTPUT"
34+
echo "Created $OUTPUT with contents in ${VERSION}/ folder"

_versioned/0.9.6.tar.xz

-56 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)