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:
@@ -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"
|
||||||
|
pnpm add "github:roadmapsh/web-draw#${LATEST_COMMIT_HASH}&path:packages/editor"
|
||||||
echo "Using commit hash: $LATEST_COMMIT_HASH"
|
fi
|
||||||
|
|
||||||
# Install the package using the commit hash
|
|
||||||
pnpm add github:roadmapsh/web-draw#"$LATEST_COMMIT_HASH"\&path:packages/editor
|
|
Reference in New Issue
Block a user