Skip to content

Commit

Permalink
Fix S3 path adding prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
antoineludeau committed Mar 4, 2024
1 parent 9039af3 commit dafbe96
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/distribute/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const {getCommuneData} = require('../models/commune.cjs')
const {getCodesCommunes} = require('../util/cog.cjs')
const mongo = require('../util/mongo.cjs')

const EXPORT_FILES_S3_PATH = 'ban/adresses/latest'
const EXPORT_FILES_S3_PATH = 'adresse-data/ban/adresses/latest'

async function main({departement, distributions}) {
await mongo.connect()
Expand Down
2 changes: 1 addition & 1 deletion scripts/create-and-upload-national-files-to-s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import s3 from '../lib/util/s3.cjs'

const {S3_CONFIG_BUCKET} = process.env

const prefixBase = 'ban/adresses/latest'
const prefixBase = 'adresse-data/ban/adresses/latest'
const tempFolderName = 'dist'
const nationalFilesConfig = [{
type: 'csv-bal',
Expand Down
4 changes: 2 additions & 2 deletions scripts/create-dated-archive-folder-on-s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import 'dotenv/config.js' // eslint-disable-line import/no-unassigned-import
import s3 from '../lib/util/s3.cjs'

// Define the source and destination folders
const sourceFolder = 'ban/adresses/latest'
const sourceFolder = 'adresse-data/ban/adresses/latest'
const currentDate = new Date()
const folderName = currentDate.toISOString().split('T')[0]
const destinationFolder = `ban/adresses/${folderName}`
const destinationFolder = `adresse-data/ban/adresses/${folderName}`

// Function to copy a folder within an S3 bucket

Expand Down

0 comments on commit dafbe96

Please sign in to comment.