mirror of
https://github.com/Instadapp/trustwallet-assets.git
synced 2024-07-29 22:37:31 +00:00
[Internal] Filter changed files to blockchains and dapps folders (#5668)
* Merge fix and history build into one. * Filter chganged files to blockchains and dapps foldersx). * Debug github.ref * Fix echo * Debug * Debug * Remove * Debug * Debug * Setup history conditions * Cleanup Co-authored-by: Catenocrypt <catenocrypt@users.noreply.github.com>
This commit is contained in:
parent
943556a3a9
commit
2a8fcc707c
4
.github/workflows/fix.yml
vendored
4
.github/workflows/fix.yml
vendored
|
@ -36,8 +36,10 @@ jobs:
|
||||||
- name: Run fix-sanity script (fork repo, sanity only)
|
- name: Run fix-sanity script (fork repo, sanity only)
|
||||||
if: github.repository_owner != 'trustwallet'
|
if: github.repository_owner != 'trustwallet'
|
||||||
run: npm run fix-sanity
|
run: npm run fix-sanity
|
||||||
|
- name: Debug # TODO remove
|
||||||
|
run: echo $GITHUB_REF $GITHUB_BASE_REF {{github.branch}} {{github.ref}}
|
||||||
- name: Run history
|
- name: Run history
|
||||||
if: github.repository_owner == 'trustwallet' && github.branch == 'master'
|
if: github.repository_owner == 'trustwallet' && (github.base_ref == 'master' || github.ref == 'master')
|
||||||
run: npm run history
|
run: npm run history
|
||||||
- name: Show result (diff) (run 'npm run fix' locally)
|
- name: Show result (diff) (run 'npm run fix' locally)
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -14,7 +14,8 @@ class VersionInfo {
|
||||||
|
|
||||||
const FilenameLatest = "history/LATEST.json";
|
const FilenameLatest = "history/LATEST.json";
|
||||||
const FilenameChangeTemplate = "history/versions/";
|
const FilenameChangeTemplate = "history/versions/";
|
||||||
const IgnoreHistoryPrefix = "history/";
|
const IncludeHistoryPrefix1 = "blockchains/";
|
||||||
|
const IncludeHistoryPrefix2 = "dapps/";
|
||||||
const TooManyChangesLimit = 40;
|
const TooManyChangesLimit = 40;
|
||||||
|
|
||||||
//const util = require('util');
|
//const util = require('util');
|
||||||
|
@ -82,8 +83,7 @@ async function getChangedFiles(commitStart: string, commitEnd: string): Promise<
|
||||||
|
|
||||||
function filterChangedFiles(files: string[]): string[] {
|
function filterChangedFiles(files: string[]): string[] {
|
||||||
return files.filter(l => {
|
return files.filter(l => {
|
||||||
if (l.startsWith(IgnoreHistoryPrefix)) return false;
|
return (l.startsWith(IncludeHistoryPrefix1) || l.startsWith(IncludeHistoryPrefix2));
|
||||||
return true;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user