2019-02-05 00:58:18 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-02-08 03:12:36 +03:00
|
|
|
slug=$(cat package.json | npx fx 'p => `${p.name}@${p.version}`')
|
|
|
|
npx action-status --context="$PUBLISH_STATUS_CONTEXT" \
|
|
|
|
--state=pending \
|
|
|
|
--description="publishing $slug..."
|
2019-02-06 00:13:56 +03:00
|
|
|
|
2019-02-05 02:37:52 +03:00
|
|
|
# generate the build directory
|
|
|
|
npm run dist
|
|
|
|
|
2019-02-12 08:04:36 +03:00
|
|
|
# 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
|
|
|
|
|
2019-02-05 00:58:18 +03:00
|
|
|
files=$(git ls-files src | sed -e 's#^src/##' | sed -e 's#/.*$##' | sort -u)
|
2019-02-08 03:40:38 +03:00
|
|
|
echo $files > publish-files.log
|
2019-02-05 00:58:18 +03:00
|
|
|
cd src
|
|
|
|
cp -rv $files ..
|
|
|
|
cd -
|