mirror of
https://github.com/Instadapp/trustwallet-assets.git
synced 2024-07-29 22:37:31 +00:00
Use task in pipeline
This commit is contained in:
parent
e429ad9535
commit
f4c8c2eb77
|
@ -21,10 +21,13 @@ steps:
|
|||
versionSpec: '12.x'
|
||||
displayName: Install Node.js
|
||||
|
||||
- script: |
|
||||
- task: Bash@3
|
||||
displayName: Install global dependency
|
||||
inputs:
|
||||
targetType: inline
|
||||
script: |
|
||||
sudo npm install -g typescript
|
||||
sudo npm install -g ts-node
|
||||
displayName: Install global dependency
|
||||
|
||||
- task: Npm@1
|
||||
inputs:
|
||||
|
@ -37,10 +40,15 @@ steps:
|
|||
# path: $(npm_config_cache)
|
||||
# displayName: Cache npm
|
||||
|
||||
- script: |
|
||||
- task: Bash@3
|
||||
displayName: Set git config
|
||||
inputs:
|
||||
targetType: inline
|
||||
script: |
|
||||
git config --global user.email "bot@trustwallet.com"
|
||||
git config --global user.name "TrustWalletBot"
|
||||
|
||||
|
||||
- script: sudo npm run checksum:erc20
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
displayName: Run checksum script
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
if [[ `git status --porcelain --untracked-files=no` ]]; then
|
||||
git add .
|
||||
git commit -m "Checksum ERC20 addresses [skip ci]"
|
||||
echo Current branch
|
||||
echo Pushing changes to branch: "$SYSTEM_PULLREQUEST_SOURCEBRANCH"
|
||||
echo Current branch $(git branch)
|
||||
git status
|
||||
|
|
|
@ -12,7 +12,7 @@ ethSidechains.forEach(chain => {
|
|||
const isChecksum = web3.utils.checkAddressChecksum(addr)
|
||||
|
||||
if (!isChecksum) {
|
||||
console.log(`Address ${addr} not in checksum`)
|
||||
console.log(`Renaming non checksum ${addr} ...`)
|
||||
const checksum = web3.utils.toChecksumAddress(addr)
|
||||
const moveToChecksum = `git mv ${addr} ${checksum}-temp && git mv ${checksum}-temp ${checksum}`
|
||||
const renamed = execSync(`cd ${assetsPath} && ${moveToChecksum}`, {encoding: "utf-8"})
|
||||
|
|
Loading…
Reference in New Issue
Block a user