-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Figma API token optional in export script, fix CI issues #234
Conversation
.gitignore
Outdated
build/ | ||
lib/octicons_gem/lib/data.json | ||
lib/build/ | ||
lib/**/build/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines are redundant.
@@ -5,6 +5,7 @@ | |||
"scripts": { | |||
"version": "../../script/rubyversion ./lib/octicons_helper/version.rb", | |||
"postinstall": "bundle install --path vendor/bundle", | |||
"prepare": "echo '(no prepare needed here)'", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes it easier to just run npx lerna run prepare
from the top level.
gem "rubocop" | ||
gem "rubocop-github" | ||
gem "rubocop", "0.50" | ||
gem "rubocop-github", "0.5.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated these to match the versions in octicons_gem/Gemfile
.
"ts-test": "tsc -P ts-tests", | ||
"test": "jest", | ||
"posttest": "npm run ts-test", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TypeScript tests are run after the main test suite now.
FYI @jonrohan, our |
@@ -3,7 +3,7 @@ set -e | |||
# pwd | |||
package=$(jq -r .name package.json) | |||
version=$(jq -r .version package.json) | |||
published=$(npm info $package@$version version) | |||
published=$(npm info "$package@$version" version || echo "0.0.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This used to throw an error if the package you specified didn't exist. If that's the case, just return 0.0.0
.
This is intended to fix #233 by working around the absence of the
FIGMA_TOKEN
environment variable on Travis. Here's how it works:FIGMA_TOKEN
, we use that and fetch the icons from Figma as usual.version
field fromlib/octicons_node/package.json
package.json
from GitHub at the versioned tag (https://raw.githubusercontent.com/primer/octicons/v${version}/package.json
)figma.url
field is the same as the one in the local top-levelpackage.json
, we can assume that the icons haven't changed in this build and fetch the build files fromhttps://unpkg.com/octicons@${version}/build/
One issue that I ran into getting files from
unpkg.com
was a mysterious SSL/TLS error complaining about a self-signed cert. I think it's the same as this error, but none of the suggested solutions in that thread worked for me, so I worked around the Node's TLS by shelling out tocurl -sL
. 炉\_馃_/炉