1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-08-29 20:21:50 +02:00

Make deployment script accept pat

This commit is contained in:
Kamran Ahmed
2025-04-04 20:59:44 +01:00
parent 7564895d7a
commit 8662416c96

View File

@@ -4,11 +4,10 @@ set -e
if [ -n "$GH_PAT" ]; then if [ -n "$GH_PAT" ]; then
LATEST_COMMIT_HASH=$(git ls-remote "https://${GH_PAT}@github.com/roadmapsh/web-draw.git" refs/heads/main | awk '{print $1}') LATEST_COMMIT_HASH=$(git ls-remote "https://${GH_PAT}@github.com/roadmapsh/web-draw.git" refs/heads/main | awk '{print $1}')
echo "Using commit hash: $LATEST_COMMIT_HASH"
pnpm add "https://${GH_PAT}@github.com/roadmapsh/web-draw#${LATEST_COMMIT_HASH}&path:packages/editor"
else else
LATEST_COMMIT_HASH=$(git ls-remote git@github.com:roadmapsh/web-draw.git refs/heads/main | awk '{print $1}') LATEST_COMMIT_HASH=$(git ls-remote git@github.com:roadmapsh/web-draw.git refs/heads/main | awk '{print $1}')
fi
echo "Using commit hash: $LATEST_COMMIT_HASH" echo "Using commit hash: $LATEST_COMMIT_HASH"
pnpm add "github:roadmapsh/web-draw#${LATEST_COMMIT_HASH}&path:packages/editor"
# Install the package using the commit hash fi
pnpm add github:roadmapsh/web-draw#"$LATEST_COMMIT_HASH"\&path:packages/editor