mirror of
https://github.com/status-im/sourcecred.git
synced 2025-01-12 05:34:41 +00:00
4ae502bfd3
I'm re-organizing SC data to be oriented on the graph, rather than on plugin-specific data structures. So there is no longer a need for the git loading logic which orients around saving a repository.json file that's been potentially merged across repos, or indeed the logic for merging repositories at all. So I'm removing `git/loadGitData`, `git/mergeRepository`, and relatives. Test plan: `yarn test --full` passes.
39 lines
1.1 KiB
Bash
Executable File
39 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
# Automatically update all SourceCred snapshot data.
|
|
set -eu
|
|
|
|
toplevel="$(git -C "$(dirname "$0")" rev-parse --show-toplevel)"
|
|
cd "${toplevel}"
|
|
|
|
tmpdir="$(mktemp -d)"
|
|
cleanup() {
|
|
rm -r "${tmpdir}"
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
SOURCECRED_BIN="${tmpdir}/bin"
|
|
yarn run --silent backend --output-path "${SOURCECRED_BIN}"
|
|
export SOURCECRED_BIN # for Sharness and shell tests
|
|
export NODE_PATH="${toplevel}/node_modules${NODE_PATH:+:${NODE_PATH}}"
|
|
|
|
echo "Updating GitHub GraphQL Flow types"
|
|
cp .prettierrc.json "${SOURCECRED_BIN}/"
|
|
node "${SOURCECRED_BIN}/generateGithubGraphqlFlowTypes.js" \
|
|
>src/plugins/github/graphqlTypes.js
|
|
|
|
echo "Updating sharness/test_load_example_github.t"
|
|
(cd sharness; UPDATE_SNAPSHOT=1 ./test_load_example_github.t -l)
|
|
|
|
echo "Updating sharness/test_cli_scores.t"
|
|
(cd sharness; UPDATE_SNAPSHOT=1 ./test_cli_scores.t -l)
|
|
|
|
echo "Updating github/fetchGithubOrgTest.sh"
|
|
./src/plugins/github/fetchGithubOrgTest.sh -u --no-build
|
|
|
|
echo "Updating github/fetchGithubRepoTest.sh"
|
|
./src/plugins/github/fetchGithubRepoTest.sh -u --no-build
|
|
|
|
echo "Updating Jest snapshots"
|
|
yarn unit -u
|