Skip to content

Commit

Permalink
Release 3 updated icons (v9.19.1)
Browse files Browse the repository at this point in the history
# Updated Icons

- Hilton (#9704)
- Hoppscotch (#9658)
- HP (#9659)
  • Loading branch information
mondeja committed Nov 5, 2023
2 parents fdbaaa2 + 380ecda commit 7568c66
Show file tree
Hide file tree
Showing 11 changed files with 97 additions and 37 deletions.
20 changes: 20 additions & 0 deletions .github/actions/get-labels/action.yml
@@ -0,0 +1,20 @@
name: Get issue/pull request labels
description: Get the current labels of an issue or pull request through the GitHub API

inputs:
issue_number:
description: Issue or pull request number to get labels from
required: true
outputs:
labels:
description: Labels of the issue or pull request
value: ${{ steps.get-labels.outputs.labels }}

runs:
using: composite
steps:
- id: get-labels
shell: sh
run: |
labels="$(gh api 'repos/simple-icons/simple-icons/issues/${{ inputs.issue_number }}' --jq '.labels.[].name')"
echo "labels=$labels" >> $GITHUB_OUTPUT
16 changes: 16 additions & 0 deletions .github/actions/get-version/action.yml
@@ -0,0 +1,16 @@
name: Get version
description: Get the current version of the project

outputs:
version:
description: The version of the project
value: ${{ steps.get-version.outputs.version }}

runs:
using: composite
steps:
- id: get-version
shell: sh
run: |
version="$(grep version -m 1 -i package.json | sed 's/[ \",:version]//g')"
echo "version=$version" >> $GITHUB_OUTPUT
7 changes: 3 additions & 4 deletions .github/workflows/add-labels-priority.yml
Expand Up @@ -21,10 +21,9 @@ jobs:
MY_GITHUB_TOKEN: ${{ secrets.AUTO_ASSIGN_WORKFLOW_TOKEN }}
steps:
- id: get-labels
name: Get labels
run: |
labels="$(curl --retry 5 -s https://api.github.com/repos/simple-icons/simple-icons/pulls/${{ github.event.pull_request.number }} | jq '.labels[].name' | tr '\n' ',' | sed -e 's/"//g' -e 's/,$//')"
echo "labels=$labels" >> $GITHUB_OUTPUT
uses: ./.github/actions/get-labels
with:
issue_number: ${{ github.event.pull_request.number }}

- id: get-si-members
name: Get simple-icons members
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/autoclose-issues.yml
Expand Up @@ -19,10 +19,9 @@ jobs:
fi
- id: get-labels
name: Get labels
run: |
labels="$(curl --retry 5 -s https://api.github.com/repos/simple-icons/simple-icons/issues/${{ github.event.issue.number }} | jq '.labels[].name' | tr '\n' ',' | sed -e 's/"//g' -e 's/,$//')"
echo "labels=$labels" >> $GITHUB_OUTPUT
uses: ./.github/actions/get-labels
with:
issue_number: ${{ github.event.issue.number }}

# if the issue is labeled as a 'new icon' and it matches Java, we
# - add a comment referring to the removal request
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/publish.yml
Expand Up @@ -48,10 +48,12 @@ jobs:
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-
- id: get-version
uses: ./.github/actions/get-version
- name: Install dependencies
run: npm i
- name: Replace CDN theme image links from README
run: npm run strip-theme-link
run: node ./scripts/release/strip-theme-links.js "${{ steps.get-version.outputs.version }}"
- name: Update SDK Typescript definitions
run: node ./scripts/release/update-sdk-ts-defs.js
- name: Build NodeJS package
Expand All @@ -70,13 +72,10 @@ jobs:
- name: Get commit message (for release title and body)
id: commit
uses: kceb/git-message-action@v2
- name: Get release version
id: get-version
run: |
export PACKAGE_VERSION=$(cat package.json | grep 'version' | sed 's/[ \",:]//g' | sed 's/version//')
echo "::set-output name=version::$PACKAGE_VERSION"
- id: get-version
uses: ./.github/actions/get-version
- name: Replace CDN theme image links from README
run: npm run strip-theme-link
run: node ./scripts/release/strip-theme-links.js "${{ steps.get-version.outputs.version }}"
- name: Configure GIT credentials
run: |
git config user.name "${GITHUB_ACTOR}"
Expand Down
12 changes: 7 additions & 5 deletions _data/simple-icons.json
Expand Up @@ -5982,8 +5982,9 @@
},
{
"title": "Hilton",
"hex": "124D97",
"source": "https://newsroom.hilton.com/hhr/page/logos"
"hex": "231F20",
"source": "https://www.hilton.com",
"guidelines": "https://stories.hilton.com/media-kit-hilton-corporate"
},
{
"title": "Hitachi",
Expand Down Expand Up @@ -6056,8 +6057,8 @@
},
{
"title": "Hoppscotch",
"hex": "31C48D",
"source": "https://github.com/hoppscotch/hoppscotch/blob/77862cdf9bd902a4ea64bd8b2301ed2206820649/static/images/ufo_logo.svg"
"hex": "10B981",
"source": "https://github.com/hoppscotch/hoppscotch/blob/65884293be0f1124c3db0c3fe985fe78b307d787/packages/hoppscotch-common/public/logo.svg"
},
{
"title": "Hotels.com",
Expand Down Expand Up @@ -6088,7 +6089,8 @@
{
"title": "HP",
"hex": "0096D6",
"source": "https://brandcentral.ext.hp.com/login"
"source": "https://brandcentral.hp.com/us/en/elements/hp-logo.html",
"guidelines": "https://brandcentral.hp.com/us/en/elements/hp-logo.html"
},
{
"title": "HSBC",
Expand Down
2 changes: 1 addition & 1 deletion icons/hilton.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/hoppscotch.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/hp.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 36 additions & 13 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "simple-icons",
"version": "9.19.0",
"version": "9.19.1",
"description": "SVG icons for popular brands https://simpleicons.org",
"homepage": "https://simpleicons.org",
"keywords": [
Expand All @@ -12,16 +12,40 @@
"types": "index.d.ts",
"exports": {
".": {
"module": "./index.mjs",
"import": "./index.mjs",
"require": "./index.js",
"default": "./index.js"
"import": {
"types": "./index.d.ts",
"default": "./index.mjs"
},
"module": {
"types": "./index.d.ts",
"default": "./index.mjs"
},
"require": {
"types": "./index.d.ts",
"default": "./index.js"
},
"default": {
"types": "./index.d.ts",
"default": "./index.js"
}
},
"./icons": {
"module": "./index.mjs",
"import": "./index.mjs",
"require": "./index.js",
"default": "./index.js"
"import": {
"types": "./index.d.ts",
"default": "./index.mjs"
},
"module": {
"types": "./index.d.ts",
"default": "./index.mjs"
},
"require": {
"types": "./index.d.ts",
"default": "./index.js"
},
"default": {
"types": "./index.d.ts",
"default": "./index.js"
}
},
"./icons/*": [
"./icons/*"
Expand Down Expand Up @@ -62,6 +86,7 @@
"devDependencies": {
"@inquirer/prompts": "3.2.0",
"chalk": "5.3.0",
"del-cli": "5.1.0",
"editorconfig-checker": "5.1.1",
"esbuild": "0.19.4",
"fake-diff": "1.0.0",
Expand All @@ -74,7 +99,6 @@
"named-html-entities-json": "1.0.0",
"npm-run-all": "4.1.5",
"prettier": "3.0.3",
"rimraf": "5.0.5",
"svg-path-bbox": "1.2.4",
"svg-path-segments": "1.0.0",
"svglint": "2.4.0",
Expand All @@ -84,7 +108,7 @@
},
"scripts": {
"build": "node scripts/build/package.js",
"clean": "rimraf index.js index.mjs index.d.ts sdk.js",
"clean": "del-cli index.js index.mjs index.d.ts sdk.js",
"format": "prettier --write .",
"lint": "run-s our-lint jslint jsonlint svglint wslint",
"our-lint": "node scripts/lint/ourlint.js",
Expand All @@ -99,8 +123,7 @@
"pretest": "npm run prepublishOnly",
"posttest": "npm run postpublish",
"get-filename": "node scripts/get-filename.js",
"add-icon-data": "node scripts/add-icon-data.js",
"strip-theme-link": "node scripts/build/strip-theme-link.js"
"add-icon-data": "node scripts/add-icon-data.js"
},
"engines": {
"node": ">=0.12.18"
Expand Down
Expand Up @@ -7,6 +7,8 @@ import path from 'node:path';
import { writeFile, readFile } from 'node:fs/promises';
import { getDirnameFromImportMeta } from '../../sdk.mjs';

const LINKS_BRANCH = process.argv[2] || 'develop';

const __dirname = getDirnameFromImportMeta(import.meta.url);

const rootDir = path.resolve(__dirname, '..', '..');
Expand All @@ -17,6 +19,6 @@ await writeFile(
readmeFile,
readme.replace(
/https:\/\/cdn.simpleicons.org\/(.+)\/000\/fff/g,
'https://raw.githubusercontent.com/simple-icons/simple-icons/develop/icons/$1.svg',
`https://raw.githubusercontent.com/simple-icons/simple-icons/${LINKS_BRANCH}/icons/$1.svg`,
),
);

0 comments on commit 7568c66

Please sign in to comment.