Skip to content

Commit 7603852

Browse files
committed
fixed that workflow stil uses old cwd paths
1 parent e97c88a commit 7603852

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ jobs:
8585
run: |
8686
echo "Generating new database manifest version..."
8787
88+
# Get the shared data directory path (where postinstall downloaded the docs DB)
89+
DATA_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/mcmodding-mcp"
90+
echo "Using shared data directory: $DATA_DIR"
91+
ls -lh "$DATA_DIR/" || echo "Warning: Shared data directory contents not found"
92+
8893
# Regenerate manifest with a patch bump to ensure a new version is created
8994
# This makes the DB version independent of the package version
9095
pnpm run db:manifest -- --bump patch --changelog "Release $RELEASE_TAG" --release-tag "$RELEASE_TAG"
@@ -95,11 +100,11 @@ jobs:
95100
96101
mkdir -p release-artifacts
97102
98-
# Documentation database artifacts
99-
cp data/mcmodding-docs.db release-artifacts/
103+
# Documentation database - from shared data directory (where postinstall downloaded it)
104+
cp "$DATA_DIR/mcmodding-docs.db" release-artifacts/
100105
cp data/db-manifest.json release-artifacts/db-manifest.json
101106
102-
# Parchment mappings artifacts
107+
# Parchment mappings - from ./data/ (where index-mappings created it)
103108
cp data/parchment-mappings.db release-artifacts/
104109
cp data/parchment-mappings-manifest.json release-artifacts/parchment-mappings-manifest.json
105110

scripts/generate-db-manifest.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ async function main() {
8181

8282
// Write manifest to data directory for release
8383
const dataDir = path.join(process.cwd(), 'data');
84+
if (!fs.existsSync(dataDir)) {
85+
fs.mkdirSync(dataDir, { recursive: true });
86+
}
8487
const manifestPath = path.join(dataDir, 'db-manifest.json');
8588
fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2));
8689

0 commit comments

Comments
 (0)