mirror of
https://github.com/primer/css.git
synced 2024-11-26 02:38:32 +03:00
25 lines
639 B
Bash
Executable File
25 lines
639 B
Bash
Executable File
#!/bin/bash
|
|
|
|
slug=$(cat package.json | npx fx 'p => `${p.name}@${p.version}`')
|
|
npx action-status --context="$PUBLISH_STATUS_CONTEXT" \
|
|
--state=pending \
|
|
--description="publishing $slug..."
|
|
|
|
# generate the build directory
|
|
npm run dist
|
|
|
|
# run the selector diff report
|
|
script/selector-diff-report
|
|
|
|
# TODO: remove this in v13
|
|
mkdir -p build
|
|
cp dist/primer.css build/build.css
|
|
cp dist/stats/primer.json build/build.json
|
|
echo "module.exports = {cssstats: require('./build.json')}" > build/index.js
|
|
|
|
files=$(git ls-files src | sed -e 's#^src/##' | sed -e 's#/.*$##' | sort -u)
|
|
echo $files > publish-files.log
|
|
cd src
|
|
cp -rv $files ..
|
|
cd -
|