Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dochne/wappalyzer
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: HTTPArchive/wappalyzer
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Sep 22, 2023

  1. Add support for PubTech CMP

    Add Detection to PubTech CMP.
    
    Example JS: https://cmp.pubtech.ai/1/pubtech-cmp-v2.js
    
    CMP Site: https://www.pubtech.ai/
    gilbertococchi authored Sep 22, 2023
    Copy the full SHA
    4ab1185 View commit details
  2. Add PubTech CMP Icon

    gilbertococchi authored Sep 22, 2023
    Copy the full SHA
    be9b9e6 View commit details

Commits on Sep 25, 2023

  1. Update src/technologies/p.json

    Add detection via JS global variable
    
    Co-authored-by: Rick Viscomi <rviscomi@users.noreply.github.com>
    gilbertococchi and rviscomi authored Sep 25, 2023
    Copy the full SHA
    28a88cc View commit details
  2. Update src/technologies/p.json

    adding version support working on both SDK types (esm or not)
    
    Co-authored-by: Rick Viscomi <rviscomi@users.noreply.github.com>
    gilbertococchi and rviscomi authored Sep 25, 2023
    Copy the full SHA
    d4f67cf View commit details
  3. Merge pull request #1 from gilbertococchi/patch-1

    Add Detection for PubTech CMP
    rviscomi authored Sep 25, 2023
    Copy the full SHA
    c2a24ee View commit details

Commits on Sep 26, 2023

  1. Remove DNS TXT Match fron OneTrust CMP

    DSN TXT Match seems to be buggy in Wappalyzer and matches domains such as www.google.com flaggying it to be using OneTrust or other technologies not being used like "Apple iCloud Mail"
    gilbertococchi authored Sep 26, 2023
    Copy the full SHA
    28d3c57 View commit details

Commits on Nov 10, 2023

  1. Merge pull request #2 from gilbertococchi/patch-2

    Remove DNS TXT Match fron OneTrust CMP
    tunetheweb authored Nov 10, 2023
    Copy the full SHA
    fe8c861 View commit details

Commits on Nov 20, 2023

  1. Copy the full SHA
    cdd0b56 View commit details
  2. json for Burst Statistics

    rlankhorst committed Nov 20, 2023
    Copy the full SHA
    cf2da11 View commit details
  3. changed pattern

    rlankhorst committed Nov 20, 2023
    Copy the full SHA
    66f3f73 View commit details

Commits on Dec 12, 2023

  1. Copy the full SHA
    3c39ef4 View commit details
  2. Update src/technologies/n.json

    Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
    tunetheweb and timneutkens authored Dec 12, 2023
    Copy the full SHA
    6906a82 View commit details
  3. Merge pull request #6 from HTTPArchive/measure-nextjs-app-router-sepa…

    …rately
    
    Measure Next.js App Router separately
    tunetheweb authored Dec 12, 2023
    Copy the full SHA
    05e1e31 View commit details

Commits on Dec 13, 2023

  1. Copy the full SHA
    5c663b2 View commit details
  2. Categories

    tunetheweb committed Dec 13, 2023
    Copy the full SHA
    f044a7d View commit details
  3. Merge pull request #4 from rlankhorst/json-for-Burst-Statistics

    json for Burst Statistics
    tunetheweb authored Dec 13, 2023
    Copy the full SHA
    8e849da View commit details

Commits on Jan 5, 2024

  1. Copy the full SHA
    2c55af9 View commit details

Commits on Jan 8, 2024

  1. Merge pull request #7 from HTTPArchive/more-next-detections

    Add SSR and SSG detection for Next.js
    tunetheweb authored Jan 8, 2024
    Copy the full SHA
    db8cf0c View commit details

Commits on Jan 9, 2024

  1. split into free & premium

    rlankhorst committed Jan 9, 2024
    Copy the full SHA
    f0690bc View commit details

Commits on Jan 14, 2024

  1. Added 'Klaviyo Reviews' and updated 'Shop Pay' related stuff

    Shop Pay can now be used outside Shopify platform. So, we can't really imply 'Shopify' from 'Shop Pay' See this -  https://x.com/harleyf/status/1745857804882297172?s=20
    rockeynebhwani committed Jan 14, 2024
    Copy the full SHA
    f712f41 View commit details
  2. Copy the full SHA
    c755b03 View commit details

Commits on Jan 17, 2024

  1. Copy the full SHA
    fb1c854 View commit details
  2. Copy the full SHA
    7fc444d View commit details
  3. Copy the full SHA
    fdcc558 View commit details
  4. Typos and rephrasing

    meryllblanchet committed Jan 17, 2024
    Copy the full SHA
    e529d6a View commit details
  5. Capitalized "Services"

    meryllblanchet committed Jan 17, 2024
    Copy the full SHA
    f649287 View commit details

Commits on Jan 31, 2024

  1. Revert "split into free & premium"

    This reverts commit f0690bc.
    rlankhorst committed Jan 31, 2024
    Copy the full SHA
    b473360 View commit details
  2. added freemium pricing

    rlankhorst committed Jan 31, 2024
    Copy the full SHA
    60dd0bc View commit details
  3. Copy the full SHA
    ea14040 View commit details
  4. Merge pull request #3 from rlankhorst/Complianz-recognize-free-as-well

    recurring, allow for free scriptSrc as well
    tunetheweb authored Jan 31, 2024
    Copy the full SHA
    ecd177b View commit details
  5. Fix validations

    tunetheweb committed Jan 31, 2024
    Copy the full SHA
    dfd09b4 View commit details
  6. More fixes

    tunetheweb committed Jan 31, 2024
    Copy the full SHA
    5cb290e View commit details
  7. Merge pull request #9 from rockeynebhwani/main

    Added 'Klaviyo Reviews' and updated 'Shop Pay' / 'Shop Pay Instalments'
    tunetheweb authored Jan 31, 2024
    Copy the full SHA
    f111790 View commit details
  8. Avid it running twice

    tunetheweb committed Jan 31, 2024
    Copy the full SHA
    d7ddc62 View commit details
  9. Merge pull request #11 from HTTPArchive/validations

    Fix validations
    tunetheweb authored Jan 31, 2024
    Copy the full SHA
    3e2974a View commit details
  10. Merge lint and prettify

    tunetheweb committed Jan 31, 2024
    Copy the full SHA
    ba8634e View commit details
  11. Revert "Merge lint and prettify"

    This reverts commit ba8634e.
    tunetheweb committed Jan 31, 2024
    Copy the full SHA
    4b50e0f View commit details
  12. Merge pull request #12 from HTTPArchive/revert-accidential-push

    Revert accidental push
    tunetheweb authored Jan 31, 2024
    Copy the full SHA
    77f0443 View commit details
  13. Merge preity and lint

    tunetheweb committed Jan 31, 2024
    Copy the full SHA
    bde5cd3 View commit details

Commits on Feb 1, 2024

  1. Merge pull request #13 from HTTPArchive/remove-prettify

    Merge prettify and lint
    tunetheweb authored Feb 1, 2024
    Copy the full SHA
    3d1392c View commit details

Commits on Feb 2, 2024

  1. add new svelte 4+ detection method

    As of Svelte 4, there is a window.__svelte object that can be
    used to detect Svelte usage. This commit adds it to the list
    of detection methods.
    kara committed Feb 2, 2024
    Copy the full SHA
    fd0bbaa View commit details
  2. Merge pull request #14 from kara/svelte

    add new svelte 4+ detection method
    tunetheweb authored Feb 2, 2024
    Copy the full SHA
    5e8d489 View commit details

Commits on Feb 29, 2024

  1. icon

    rlankhorst committed Feb 29, 2024
    Copy the full SHA
    66639b3 View commit details
  2. use dom as detection

    rlankhorst committed Feb 29, 2024
    Copy the full SHA
    1a73c0d View commit details

Commits on Mar 7, 2024

  1. add wakecommerce icon

    nilsocjr committed Mar 7, 2024
    Copy the full SHA
    daf99a6 View commit details

Commits on Mar 9, 2024

  1. Merge pull request #18 from nilsocjr/wake-commerce-img

    add wakecommerce icon
    tunetheweb authored Mar 9, 2024
    Copy the full SHA
    a3d67d0 View commit details
  2. Rename Fbits to Wake

    tunetheweb committed Mar 9, 2024
    Copy the full SHA
    48a9df7 View commit details
  3. Merge pull request #19 from HTTPArchive/fbits-wake

    Rename Fbits to Wake
    tunetheweb authored Mar 9, 2024
    Copy the full SHA
    32eeecf View commit details
  4. Merge pull request #17 from rlankhorst/really-simple-ssl

    Really simple ssl
    tunetheweb authored Mar 9, 2024
    Copy the full SHA
    01dfff9 View commit details

Commits on Mar 25, 2024

  1. Fixed Shopify Chat Detection

    Shopify Chat loading changed. Core Web Vitals technology was showing a big drop
    rockeynebhwani committed Mar 25, 2024
    Copy the full SHA
    5399ae6 View commit details
Showing with 10,797 additions and 11,715 deletions.
  1. +3 −3 .editorconfig
  2. +0 −2 .eslintignore
  3. +0 −19 .eslintrc.js
  4. +0 −19 .gitattributes
  5. +1 −1 .github/ISSUE_TEMPLATE/technology-request.md
  6. +16 −0 .github/dependabot.yml
  7. +15 −0 .github/pull_request_template.md
  8. +52 −0 .github/workflows/lint.yml
  9. +0 −23 .github/workflows/stale.yml
  10. +91 −0 .github/workflows/test.yml
  11. +85 −0 .github/workflows/upload.yml
  12. +0 −28 .github/workflows/validate.yml
  13. +0 −15 .gitignore
  14. +0 −5 .prettierrc
  15. +9 −13 CONTRIBUTING.md
  16. +19 −19 README.md
  17. +0 −45 bin/build.js
  18. +0 −176 bin/convert.js
  19. +0 −12 bin/manifest.js
  20. 0 build/.gitkeep
  21. +21 −0 eslint.config.mjs
  22. +7,960 −0 package-lock.json
  23. +35 −23 package.json
  24. +12 −15 schema.json
  25. +179 −0 scripts/convert.js
  26. +242 −0 scripts/tech_upload.js
  27. +64 −62 {bin → scripts}/validate.js
  28. +0 −220 src/_locales/ca/messages.json
  29. +0 −220 src/_locales/de/messages.json
  30. +0 −214 src/_locales/el/messages.json
  31. +1 −93 src/_locales/en/messages.json
  32. +0 −220 src/_locales/es/messages.json
  33. +0 −220 src/_locales/fa/messages.json
  34. +0 −220 src/_locales/fr/messages.json
  35. +0 −219 src/_locales/gl_ES/messages.json
  36. +0 −216 src/_locales/gr/messages.json
  37. +0 −220 src/_locales/id/messages.json
  38. +0 −220 src/_locales/it/messages.json
  39. +0 −218 src/_locales/ja/messages.json
  40. +0 −218 src/_locales/kk/messages.json
  41. +0 −218 src/_locales/ko/messages.json
  42. +0 −220 src/_locales/nl/messages.json
  43. +0 −220 src/_locales/pl/messages.json
  44. +0 −220 src/_locales/pt/messages.json
  45. +0 −220 src/_locales/pt_BR/messages.json
  46. +0 −220 src/_locales/ro/messages.json
  47. +0 −218 src/_locales/ru/messages.json
  48. +0 −220 src/_locales/sk/messages.json
  49. +0 −220 src/_locales/tr/messages.json
  50. +0 −220 src/_locales/uk/messages.json
  51. +0 −219 src/_locales/uz/messages.json
  52. +0 −213 src/_locales/vi/messages.json
  53. +0 −218 src/_locales/zh_CN/messages.json
  54. +0 −219 src/_locales/zh_TW/messages.json
  55. +109 −1 src/categories.json
  56. +1 −445 src/css/styles.css
  57. +0 −18 src/html/options.html
  58. +3 −180 src/html/popup.html
  59. +1 −1 src/images/icons/1C-Bitrix.svg
  60. BIN src/images/icons/APPLOVIN.png
  61. +0 −15 src/images/icons/Adobe Experience Manager Franklin.svg
  62. BIN src/images/icons/Alia.png
  63. BIN src/images/icons/BerqWP.png
  64. +16 −0 src/images/icons/Burst.svg
  65. BIN src/images/icons/ConstructorIO.png
  66. BIN src/images/icons/Digioh.png
  67. BIN src/images/icons/Edgemesh.png
  68. +1 −0 src/images/icons/FastPixel.svg
  69. BIN src/images/icons/Fbits.png
  70. +1 −0 src/images/icons/ImageKit.svg
  71. BIN src/images/icons/Intelligems.png
  72. BIN src/images/icons/Jadu.png
  73. +4 −0 src/images/icons/Monk.svg
  74. BIN src/images/icons/Nostra.png
  75. 0 src/{drivers/webextension → }/images/icons/PandaCSS.svg
  76. BIN src/images/icons/PrettyDamnQuick.png
  77. BIN src/images/icons/PubTech.png
  78. BIN src/images/icons/Sendland.png
  79. +1 −0 src/images/icons/Slim-SEO.svg
  80. BIN src/images/icons/TrafficGuard.png
  81. +11 −0 src/images/icons/Utiq.svg
  82. BIN src/images/icons/beaver-builder-icon.png
  83. +32 −0 src/images/icons/brizy.svg
  84. +1 −0 src/images/icons/dominant-color-images.svg
  85. +1 −0 src/images/icons/embed-optimizer.svg
  86. +1 −0 src/images/icons/enhanced-image-sizes.svg
  87. BIN src/images/icons/essential-blocks.png
  88. BIN src/images/icons/genesis-blocks.png
  89. +1 −0 src/images/icons/image-prioritizer.svg
  90. +1 −0 src/images/icons/modern-image-formats.svg
  91. +1 −0 src/images/icons/optimization-detective.svg
  92. BIN src/images/icons/otter-blocks.png
  93. +1 −0 src/images/icons/pandectes.svg
  94. +1 −0 src/images/icons/performant-translations.svg
  95. BIN src/images/icons/publishpress-blocks.png
  96. BIN src/images/icons/really-simple-ssl.png
  97. +1 −0 src/images/icons/speculation-rules.svg
  98. BIN src/images/icons/themify-builder.png
  99. BIN src/images/icons/visiopt.png
  100. +27 −0 src/images/icons/wakecommerce.svg
  101. +1 −0 src/images/icons/web-worker-offloading.svg
  102. BIN src/images/icons/wp-cloud.png
  103. BIN src/images/safari.svg
  104. +3 −3 src/js/background.js
  105. +128 −126 src/js/content.js
  106. +24 −22 src/js/dom.js
  107. +246 −341 src/js/index.js
  108. +14 −14 src/js/js.js
  109. +21 −39 src/js/options.js
  110. +119 −795 src/js/popup.js
  111. +0 −210 src/js/tictactoe.js
  112. +29 −38 src/js/utils.js
  113. +157 −151 src/js/wappalyzer.js
  114. +0 −79 src/manifest-safari.json
  115. +0 −77 src/manifest-v2.json
  116. +1 −7 src/{manifest-v3.json → manifest.json}
  117. +0 −10 src/schema.json
  118. +1 −1 src/technologies/_.json
  119. +55 −13 src/technologies/a.json
  120. +70 −1 src/technologies/b.json
  121. +29 −10 src/technologies/c.json
  122. +13 −2 src/technologies/d.json
  123. +52 −1 src/technologies/e.json
  124. +27 −23 src/technologies/f.json
  125. +36 −16 src/technologies/g.json
  126. +9 −4 src/technologies/h.json
  127. +76 −12 src/technologies/i.json
  128. +18 −2 src/technologies/j.json
  129. +49 −7 src/technologies/k.json
  130. +19 −19 src/technologies/l.json
  131. +27 −2 src/technologies/m.json
  132. +64 −5 src/technologies/n.json
  133. +38 −11 src/technologies/o.json
  134. +79 −3 src/technologies/p.json
  135. +27 −7 src/technologies/r.json
  136. +59 −15 src/technologies/s.json
  137. +64 −3 src/technologies/t.json
  138. +14 −1 src/technologies/u.json
  139. +41 −1 src/technologies/v.json
  140. +67 −4 src/technologies/w.json
  141. +10 −0 tests/.editorconfig
  142. +28 −0 tests/unit-tests.test.js
  143. +61 −0 tests/wpt.js
  144. +0 −2,717 yarn.lock
6 changes: 3 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -3,11 +3,11 @@ root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
[*.{html,md,js,css,sql}]
indent_size = 2

2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

19 changes: 0 additions & 19 deletions .eslintrc.js

This file was deleted.

19 changes: 0 additions & 19 deletions .gitattributes

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/technology-request.md
Original file line number Diff line number Diff line change
@@ -7,4 +7,4 @@ assignees: ''

---

You may request a new technology to be added but chances of having it included are greatly improved if you submit a pull request. Please refer to the [contributing guide](https://github.com/AliasIO/wappalyzer/blob/master/CONTRIBUTING.md).
You may request a new technology to be added but chances of having it included are greatly improved if you submit a pull request. Please refer to the [contributing guide](https://github.com/HTTPArchive/wappalyzer/blob/main/CONTRIBUTING.md).
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
15 changes: 15 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- PLEASE USE THIS TEMPLATE TO INCLUDE TEST WEBSITES OR YOUR PR MAY BE CLOSED!! -->

<!-- Add any related issues and a description of the changes proposed in the pull request. -->
Resolves \#1

Description of the changes...

---
<!-- List the pages that should be automatically tested as part of your custom metric changes. -->
**Test websites**:

- https://example.com/

<!-- Did you include test websites? With one bullet per sites? -->
<!-- Test websites MUST be provided for any detection changes of PRs will be closed. -->
52 changes: 52 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Lint, validate & Dependabot auto-merge

on:
pull_request:
branches:
- main
workflow_dispatch:

jobs:
lint:
name: Lint & validate
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install dependencies
run: npm install

- name: Lint
run: |
npm run lint
- name: Validate
run: |
npm run validate
dependabot:
name: Dependabot auto-merge
runs-on: ubuntu-latest
needs: lint
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'HTTPArchive/wappalyzer'

permissions:
contents: write
pull-requests: write

steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Enable auto-merge for Dependabot PRs
if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor'
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
23 changes: 0 additions & 23 deletions .github/workflows/stale.yml

This file was deleted.

91 changes: 91 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Tests

on:
pull_request_target:
branches:
- main
paths:
- "src/technologies/*.json"
- "src/categories.json"
- "src/groups.json"
- "tests/*.js"
- ".github/workflows/test.yml"
workflow_dispatch:

jobs:
test:
name: WebPageTest Test Cases
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Install dependencies
run: npm install

- name: Validate
run: |
npm run validate
- name: Run WebPageTest with unit tests
id: unit-test
env:
WPT_SERVER: "webpagetest.httparchive.org"
WPT_API_KEY: ${{ secrets.HA_API_KEY }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: npm run test

- name: Run WebPageTest for more websites
id: wpt-test
env:
WPT_SERVER: "webpagetest.httparchive.org"
WPT_API_KEY: ${{ secrets.HA_API_KEY }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_BODY: ${{ github.event.pull_request.body }}
run: |
# Read PR body into an array, removing line breaks and carriage returns
lines=()
while IFS= read -r line; do
lines+=("${line//[$'\r\n']}")
done <<< "$PR_BODY"
# Find the index of the line after "**Test websites**:"
start_index=-1
for ((i=0; i<${#lines[@]}; i++)); do
if [[ "${lines[$i]}" == *"**Test websites**:"* ]]; then
start_index=$((i + 1))
break
fi
done
# If the index is valid, then parse the URLs
if [ $start_index -gt -1 ]; then
# Initialize an array for URLs
URLS=()
url_pattern="((http|https|ftp):\/\/[a-zA-Z0-9.-]+(\.[a-zA-Z]{2,4})(\/[a-zA-Z0-9_.-]+)*(\/?)(\?[a-zA-Z0-9_.-]+=[a-zA-Z0-9%_.-]+)*(\#?)([a-zA-Z0-9%_.-=]+)*)"
for ((i=start_index; i<${#lines[@]}; i++)); do
if [[ ${lines[$i]} =~ $url_pattern ]]; then
URLS+=("${BASH_REMATCH[1]}")
fi
done
# Run WebPageTest for each URL
for TEST_WEBSITE in "${URLS[@]}"; do
echo "::group::Running WPT test for $TEST_WEBSITE"
node tests/wpt.js "$TEST_WEBSITE"
echo "::endgroup::"
done
else
echo "No websites found."
fi
- name: Add comment with results
uses: mshick/add-pr-comment@v2
if: steps.unit-test.outcome == 'success' || steps.wpt-test.outcome == 'success'
with:
refresh-message-position: true
message-path: test-results.md
85 changes: 85 additions & 0 deletions .github/workflows/upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Upload technologies to BQ and Cloud Storage

on:
push:
branches:
- main
paths:
- 'src/technologies/*.json'
- 'src/categories.json'
- 'src/groups.json'
- 'src/images/icons/**'
workflow_dispatch:

jobs:
test:
name: Test and upload to GCP
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Install dependencies
run: npm install

- name: Lint and validate
run: |
npm run lint
npm run validate
- name: Get changed technology files
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "Force update requested, processing all technology files"
files_changed=1
else
git fetch origin main --depth=2
files_changed=$(git diff --name-only HEAD^ ${{ github.sha }} -- 'src/technologies/*.json' 'src/categories.json' 'src/groups.json' | wc -l)
echo "Detected $files_changed changed technology files"
fi
echo "TECH_FILES_CHANGED=$files_changed" >> $GITHUB_ENV
- name: Upload technology rules to BigQuery
if: env.TECH_FILES_CHANGED != '0'
env:
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
run: npm run tech_upload

- name: Get changed icons
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
changed_icons=$(find src/images/icons -name "*.svg" -o -name "*.png" -print0 | xargs -0)
else
git fetch origin main --depth=2
changed_icons=$(git diff --name-only HEAD^ ${{ github.sha }} -- 'src/images/icons/*.svg' 'src/images/icons/*.png' -print0 | xargs -0)
echo "Detected changed icons: $files_changed"
fi
echo "CHANGED_ICONS=$changed_icons" >> $GITHUB_ENV
# PNG are generally smaller, and we have some SVG that are 1Mb, so conversion to PNG is necessary.
- name: Installing Image Conversion Package
if: env.CHANGED_ICONS != ''
run: sudo apt-get install -y librsvg2-bin

- name: Convert changed SVGs to PNGs
if: env.CHANGED_ICONS != ''
run: |
for file in $CHANGED_ICONS; do
if [[ "$file" == *.svg ]]; then
rsvg-convert "$file" -o "${file%.svg}.png" -w 16 -h 16
fi
done
- uses: 'google-github-actions/auth@v2'
if: env.CHANGED_ICONS != ''
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}

- uses: 'google-github-actions/setup-gcloud@v2'
if: env.CHANGED_ICONS != ''

- name: Sync new PNGs to Cloud Storage
if: env.CHANGED_ICONS != ''
run: gcloud storage rsync src/images/icons/ gs://httparchive/static/icons/ --exclude=".*.svg$" --cache-control="public, max-age=31536000, immutable"
28 changes: 0 additions & 28 deletions .github/workflows/validate.yml

This file was deleted.

Loading