Skip to content

Commit

Permalink
Temporarily removing font-building steps. (#539)
Browse files Browse the repository at this point in the history
* Disabled Flutter build, removing font statements from the React build process.
  • Loading branch information
Will Chavez authored Jan 13, 2023
1 parent 4f8e84b commit 4da8901
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 96 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ jobs:
sed -i.bk -r "s/[0-9]+\.[0-9]+\.[0-9]+/$NEW_VERSION/g" ios/FluentIcons.podspec
rm ios/FluentIcons.podspec.bk
# Needs to be "-E" instead of "-r" on macOS
- name: Replace version number in flutter/CHANGELOG.md
run: |
sed -i.bk -r "s/[0-9]+\.[0-9]+\.[0-9]+/$NEW_VERSION/g" flutter/CHANGELOG.md
rm flutter/CHANGELOG.md.bk
# # Needs to be "-E" instead of "-r" on macOS
# - name: Replace version number in flutter/CHANGELOG.md
# run: |
# sed -i.bk -r "s/[0-9]+\.[0-9]+\.[0-9]+/$NEW_VERSION/g" flutter/CHANGELOG.md
# rm flutter/CHANGELOG.md.bk

# Needs to be "-E" instead of "-r" on macOS
- name: Replace version number in flutter/pubspec.yaml
run: |
sed -i.bk -r "s/version: [0-9]+\.[0-9]+\.[0-9]+/version: $NEW_VERSION/g" flutter/pubspec.yaml
rm flutter/pubspec.yaml.bk
# # Needs to be "-E" instead of "-r" on macOS
# - name: Replace version number in flutter/pubspec.yaml
# run: |
# sed -i.bk -r "s/version: [0-9]+\.[0-9]+\.[0-9]+/version: $NEW_VERSION/g" flutter/pubspec.yaml
# rm flutter/pubspec.yaml.bk

# Needs to be "-E" instead of "-r" on macOS
- name: Replace version number in svg-icons/package.json
Expand All @@ -66,10 +66,10 @@ jobs:
rm packages/react-icons/package.json.bk
# Needs to be "-E" instead of "-r" on macOS
- name: Replace version number in react-icons-font-subsetting-webpack-plugin/package.json
run: |
sed -i.bk -r "s/\"version\": \"[0-9]+\.[0-9]+\.[0-9]+\"/\"version\": \"$NEW_VERSION\"/g" packages/react-icons-font-subsetting-webpack-plugin/package.json
rm packages/react-icons-font-subsetting-webpack-plugin/package.json.bk
# - name: Replace version number in react-icons-font-subsetting-webpack-plugin/package.json
# run: |
# sed -i.bk -r "s/\"version\": \"[0-9]+\.[0-9]+\.[0-9]+\"/\"version\": \"$NEW_VERSION\"/g" packages/react-icons-font-subsetting-webpack-plugin/package.json
# rm packages/react-icons-font-subsetting-webpack-plugin/package.json.bk

- name: Config git credentials
run: git config user.email "[email protected]" && git config user.name "Fluent Build System"
Expand Down
70 changes: 35 additions & 35 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,35 +79,35 @@ jobs:
run: python3 generate_build_gn_android.py
working-directory: importer

build-flutter:
name: Build Flutter library
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Use Node 18
uses: actions/setup-node@v1
with:
node-version: 18.x

- run: npm install

- name: Run generate script
run: npm run deploy:flutter
working-directory: importer

# Build Flutter library
# The name should be same as the package name on pub.dev
# Tokens are placeholder strings in order for the action to run on forked repos.
- name: 'fluentui_system_icons'
uses: k-paxian/dart-package-publisher@master
with:
relativePath: 'flutter'
skipTests: true
dryRunOnly: true
accessToken: "placeholder"
refreshToken: "placeholder"
# build-flutter:
# name: Build Flutter library
# runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v2

# - name: Use Node 18
# uses: actions/setup-node@v1
# with:
# node-version: 18.x

# - run: npm install

# - name: Run generate script
# run: npm run deploy:flutter
# working-directory: importer

# # Build Flutter library
# # The name should be same as the package name on pub.dev
# # Tokens are placeholder strings in order for the action to run on forked repos.
# - name: 'fluentui_system_icons'
# uses: k-paxian/dart-package-publisher@master
# with:
# relativePath: 'flutter'
# skipTests: true
# dryRunOnly: true
# accessToken: "placeholder"
# refreshToken: "placeholder"

build-svg:
name: Build svg library
Expand Down Expand Up @@ -145,10 +145,10 @@ jobs:
npm run build
working-directory: packages/react-icons
- run: |
npm run build
working-directory: packages/react-icons-font-subsetting-webpack-plugin
# - run: |
# npm run build
# working-directory: packages/react-icons-font-subsetting-webpack-plugin

- run: |
npm run test
working-directory: packages/react-icons-font-subsetting-webpack-plugin
# - run: |
# npm run test
# working-directory: packages/react-icons-font-subsetting-webpack-plugin
72 changes: 36 additions & 36 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,18 @@ jobs:
working-directory: importer

## Flutter
- name: Run Flutter generate script
run: npm run deploy:flutter
working-directory: importer

# The name should be same as the package name on pub.dev
- name: 'fluentui_system_icons'
uses: k-paxian/dart-package-publisher@master
with:
relativePath: 'flutter'
skipTests: true
accessToken: ${{ secrets.FLUTTER_OAUTH_ACCESS_TOKEN }}
refreshToken: ${{ secrets.FLUTTER_OAUTH_REFRESH_TOKEN }}
# - name: Run Flutter generate script
# run: npm run deploy:flutter
# working-directory: importer

# # The name should be same as the package name on pub.dev
# - name: 'fluentui_system_icons'
# uses: k-paxian/dart-package-publisher@master
# with:
# relativePath: 'flutter'
# skipTests: true
# accessToken: ${{ secrets.FLUTTER_OAUTH_ACCESS_TOKEN }}
# refreshToken: ${{ secrets.FLUTTER_OAUTH_REFRESH_TOKEN }}

## Publish
# Needs to be "-E" instead of "-r" on macOS
Expand All @@ -88,17 +88,17 @@ jobs:
sed -i.bk -r "s/[0-9]+\.[0-9]+\.[0-9]+/$NEW_VERSION/g" ios/FluentIcons.podspec
rm ios/FluentIcons.podspec.bk
# Needs to be "-E" instead of "-r" on macOS
- name: Replace version number in flutter/CHANGELOG.md
run: |
sed -i.bk -r "s/[0-9]+\.[0-9]+\.[0-9]+/$NEW_VERSION/g" flutter/CHANGELOG.md
rm flutter/CHANGELOG.md.bk
# # Needs to be "-E" instead of "-r" on macOS
# - name: Replace version number in flutter/CHANGELOG.md
# run: |
# sed -i.bk -r "s/[0-9]+\.[0-9]+\.[0-9]+/$NEW_VERSION/g" flutter/CHANGELOG.md
# rm flutter/CHANGELOG.md.bk

# Needs to be "-E" instead of "-r" on macOS
- name: Replace version number in flutter/pubspec.yaml
run: |
sed -i.bk -r "s/version: [0-9]+\.[0-9]+\.[0-9]+/version: $NEW_VERSION/g" flutter/pubspec.yaml
rm flutter/pubspec.yaml.bk
# # Needs to be "-E" instead of "-r" on macOS
# - name: Replace version number in flutter/pubspec.yaml
# run: |
# sed -i.bk -r "s/version: [0-9]+\.[0-9]+\.[0-9]+/version: $NEW_VERSION/g" flutter/pubspec.yaml
# rm flutter/pubspec.yaml.bk

# Needs to be "-E" instead of "-r" on macOS
- name: Replace version number in svg-icons/package.json
Expand All @@ -118,11 +118,11 @@ jobs:
sed -i.bk -r "s/\"version\": \"[0-9]+\.[0-9]+\.[0-9]+(-beta\.[0-9]+)?(-rc\.[0-9]+)?\"/\"version\": \"$REACT_VERSION\"/g" packages/react-icons/package.json
rm packages/react-icons/package.json.bk
# Needs to be "-E" instead of "-r" on macOS
- name: Replace version number in react-icons-font-subsetting-webpack-plugin/package.json
run: |
sed -i.bk -r "s/\"version\": \"[0-9]+\.[0-9]+\.[0-9]+(-beta\.[0-9]+)?(-rc\.[0-9]+)?\"/\"version\": \"$REACT_VERSION\"/g" packages/react-icons-font-subsetting-webpack-plugin/package.json
rm packages/react-icons-font-subsetting-webpack-plugin/package.json.bk
# # Needs to be "-E" instead of "-r" on macOS
# - name: Replace version number in react-icons-font-subsetting-webpack-plugin/package.json
# run: |
# sed -i.bk -r "s/\"version\": \"[0-9]+\.[0-9]+\.[0-9]+(-beta\.[0-9]+)?(-rc\.[0-9]+)?\"/\"version\": \"$REACT_VERSION\"/g" packages/react-icons-font-subsetting-webpack-plugin/package.json
# rm packages/react-icons-font-subsetting-webpack-plugin/package.json.bk

- name: Install dependencies
run: npm install
Expand All @@ -142,10 +142,10 @@ jobs:
npm run build
working-directory: packages/react-icons

- name: Build Webpack plugin library
run: |
npm run build
working-directory: packages/react-icons-font-subsetting-webpack-plugin
# - name: Build Webpack plugin library
# run: |
# npm run build
# working-directory: packages/react-icons-font-subsetting-webpack-plugin

- uses: JS-DevTools/npm-publish@v1
with:
Expand All @@ -165,11 +165,11 @@ jobs:
access: public
package: packages/react-icons/package.json

- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
access: public
package: packages/react-icons-font-subsetting-webpack-plugin/package.json
# - uses: JS-DevTools/npm-publish@v1
# with:
# token: ${{ secrets.NPM_TOKEN }}
# access: public
# package: packages/react-icons-font-subsetting-webpack-plugin/package.json

## Android
- name: Run Android generate script
Expand Down
12 changes: 1 addition & 11 deletions packages/react-icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"rollup": "node ./generateRollup.js",
"optimize": "svgo --config svgo.config.js --folder=./intermediate --precision=2",
"unfill": "find ./intermediate -type f -name \"*.svg\" -exec sed -i.bak 's/fill=\"none\"//g' {} \\; && find ./intermediate -type f -name \"*.bak\" -delete",
"build": "npm run copy && npm run generate:font && npm run optimize && npm run unfill && npm run convert:svg && npm run convert:fonts && npm run cleanSvg && npm run build:esm && npm run build:cjs && npm run copy:font-files",
"build": "npm run copy && npm run optimize && npm run unfill && npm run convert:svg && npm run cleanSvg && npm run build:esm && npm run build:cjs",
"build:cjs": "tsc --module commonjs --outDir lib-cjs && babel lib-cjs --out-dir lib-cjs",
"build:esm": "tsc && babel lib --out-dir lib"
},
Expand Down Expand Up @@ -59,22 +59,12 @@
],
"exports": {
".": {
"fluentIconFont": {
"types": "./lib/fonts/index.d.ts",
"import": "./lib/fonts/index.js",
"require": "./lib-cjs/fonts/index.js"
},
"default": {
"types": "./lib/index.d.ts",
"import": "./lib/index.js",
"require": "./lib-cjs/index.js"
}
},
"./lib/fonts": {
"types": "./lib/fonts/index.d.ts",
"import": "./lib/fonts/index.js",
"require": "./lib-cjs/fonts/index.js"
},
"./lib/svg": {
"types": "./lib/index.d.ts",
"import": "./lib/index.js",
Expand Down

0 comments on commit 4da8901

Please sign in to comment.