Skip to content

Commit 9085073

Browse files
committed
Merge branch 'main' into alexr00/required-marlin
2 parents b3b1663 + 8e9269d commit 9085073

88 files changed

Lines changed: 7888 additions & 1064 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.fantasticonrc.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
11
/* eslint-disable */
22
var pkg = require('./package.json');
33
var path = require('path');
4-
var codepoints = require('./src/template/mapping.json');
4+
var mapping = require('./src/template/mapping.json');
55

66
// Ensure paths are platform-agnostic for Windows CI
77
var inputDir = path.resolve(__dirname, 'src', 'icons');
88
var outputDir = path.resolve(__dirname, 'dist');
99
var templateHtml = path.resolve(__dirname, 'src', 'template', 'preview.hbs');
1010
var templateCss = path.resolve(__dirname, 'src', 'template', 'styles.hbs');
1111

12+
// Convert new mapping format back to alias -> code format for fantasticon
13+
// New format: { "code": ["alias1", "alias2", ...] }
14+
// Fantasticon expects: { "alias1": code, "alias2": code, ... }
15+
var codepoints = {};
16+
Object.entries(mapping).forEach(function([code, aliases]) {
17+
var codeNum = parseInt(code);
18+
aliases.forEach(function(alias) {
19+
codepoints[alias] = codeNum;
20+
});
21+
});
22+
1223
module.exports = {
1324
name: 'codicon',
1425
prefix: 'codicon',

.github/workflows/build.yml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
name: codicon-font-${{ github.sha }}.ttf
3232
path: dist/codicon.ttf
3333

34-
- name: PR to microsoft/vscode # TODO: Separate "deploy:" step?
34+
- name: PR to microsoft/vscode
3535
env:
3636
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3737
run: |
@@ -42,23 +42,26 @@ jobs:
4242
cd vscode
4343
git checkout -b $BRANCH
4444
45-
cp ../dist/codicon.ttf src/vs/base/browser/ui/codicons/codicon/
46-
cp ../dist/codiconsLibrary.ts src/vs/base/common/
45+
cp -f ../dist/codicon.ttf src/vs/base/browser/ui/codicons/codicon/
46+
cp -f ../dist/codiconsLibrary.ts src/vs/base/common/
4747
git add .
4848
4949
git config user.name "${{ github.actor }}"
5050
git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
51-
git commit -m "$MESSAGE"
5251
53-
# TODO: This doesn't work yet due to permissions
54-
#
55-
# git push -f origin $BRANCH
52+
if git diff-index --quiet HEAD --; then
53+
echo "No changes to commit"
54+
exit 0
55+
fi
56+
57+
git commit -m "$MESSAGE"
58+
git push -f https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/microsoft/vscode.git $BRANCH
5659
57-
# echo "${{ secrets.ACCESS_TOKEN }}" > token.txt
58-
# gh auth login --with-token < token.txt
60+
echo "${{ secrets.GITHUB_TOKEN }}" > token.txt
61+
gh auth login --with-token < token.txt
5962
60-
# gh pr create \
61-
# --title "$MESSAGE" \
62-
# --body "" \
63-
# --base "main" \
64-
# --head "$BRANCH"
63+
gh pr create \
64+
--title "[Codicon bump] $MESSAGE" \
65+
--body "This PR was created automatically from [vscode-codicons](https://github.com/microsoft/vscode-codicons)" \
66+
--base "main" \
67+
--head "$BRANCH"

0 commit comments

Comments
 (0)