-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #705 from adobe/mess-with-renovate
chore(renovate): use nicer branch names for renovate
- Loading branch information
Showing
3 changed files
with
51 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Update import maps | ||
on: | ||
pull_request: | ||
branches: | ||
- 'r_*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
fetch-depth: 0 | ||
- name: Configure Git | ||
run: | | ||
git config user.name 'github-actions[bot]' | ||
git config user.email 'github-actions[bot]@users.noreply.github.com' | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Update import maps | ||
run: tools/imports.sh | ||
- name: Commit changes | ||
run: | | ||
git add -A | ||
git commit -m "chore(oversight): update import maps" | ||
git push | ||
- name: Update PR comment to include aem.live test URL | ||
run: | | ||
OLD_BODY=$(gh pr view --json body --jq ".body") | ||
BRANCH_NAME=$(echo ${{ github.ref }} | sed 's|refs/heads/||') | ||
NEW_BODY="$OLD_BODY\n\nTest at: https://$BRANCH_NAME--helix-website--adobe.aem.live/tools/oversight/explorer.html?domain=www.emigrationbrewing.com" | ||
gh pr edit ${{ github.event.number }} --body "$NEW_BODY" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#! /bin/bash | ||
|
||
DEPENDENCY="@adobe/rum-distiller" | ||
VERSION_FROM_PACKAGE_JSON=$(node -e "console.log(require('./package.json').devDependencies['@adobe/rum-distiller'])") | ||
|
||
# find all import maps in the project, and replace the import named $1 with the value of $2 | ||
|
||
find ./tools/oversight -name "*.html" | while read file; do | ||
echo "Processing $file upgrading $DEPENDENCY to $VERSION_FROM_PACKAGE_JSON" | ||
# Use sed to replace the import map entry with the new version | ||
sed -i.bak "s|\"@adobe/rum-distiller\": \"https://esm.sh/@adobe/rum-distiller@[0-9.]*\"|\"@adobe/rum-distiller\": \"https://esm.sh/@adobe/rum-distiller@$VERSION_FROM_PACKAGE_JSON\"|g" "$file" | ||
rm "$file.bak" | ||
done |