Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e800059a authored by Guillaume Jacquart's avatar Guillaume Jacquart
Browse files

Add log

parent 6c94a28b
Loading
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
image: "node:16.15.0-slim"

stages:
 - build
 - deploy

build-list:
  stage: build
  stage: deploy
  script: 
    - echo "Hello CI!"
    - node build_list.js
+14 −5
Original line number Diff line number Diff line
@@ -62,15 +62,21 @@ fetch(adawayUri)
    if (trackers.length < 400) {
        throw Exception(`Not enough trackers (${trackers.length}), abort`)
    }

    console.log("DONE")  
    console.log("Trackers list finished")
})
.then(toto => {
    return printTrackers()
})
.then(trackersJson => {
    //saveTrackersFile(trackersJson)
    uploadTrackers(trackersJson)
    return uploadTrackers(trackersJson)

})
.then(res => {
    console.log(`upload response: ${res}`)
})
.then(toto => {
    console.log("DONE")
})
.catch(err => {
    console.log(err)
@@ -188,10 +194,13 @@ function uploadTrackers(trackersJson) { return new Promise((resolve, reject) =>
        }
    }

    const req = https.request(options, res => {})
    const req = https.request(options, response => {
        let data = ""
        response.on('data', (chunk) => { data += chunk })
        response.on('end', () => resolve(data))
    })
    req.on('error', reject)

    req.write(body)
    req.end()
    resolve()
})}