Skip to content

Commit

Permalink
Merge remote-tracking branch 'lardee/build-process' into test
Browse files Browse the repository at this point in the history
  • Loading branch information
vesameskanen committed Dec 27, 2024
2 parents 4a43f2b + e35e9ed commit 738fefb
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 54 deletions.
2 changes: 1 addition & 1 deletion finland/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { mapSrc } = require('../task/Common')
const { mapSrc } = require('../util')

module.exports = {
id: 'finland',
Expand Down
3 changes: 0 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const { buildOTPGraphTask } = require('./task/BuildOTPGraph')
const { renameGTFSFile } = require('./task/GTFSRename')
const { replaceGTFSFilesTask } = require('./task/GTFSReplace')
const { extractFromZip, addToZip } = require('./task/ZipTask')
const patchDeploymentFiles = require('./task/PatchDeploymentFiles')
const storageCleanup = require('./task/StorageCleanup')

const seedSourceDir = `${config.dataDir}/router-${config.router.id}` // e.g. data/router-hsl
Expand Down Expand Up @@ -182,6 +181,4 @@ gulp.task('router:store', () =>
gulp.src(`${config.dataDir}/build/${config.router.id}/**/*`, { buffer: false }).pipe(gulp.dest(`${config.storageDir}/${global.storageDirName}/`))
)

gulp.task('deploy:prepare', () => patchDeploymentFiles())

gulp.task('storage:cleanup', () => storageCleanup(config.storageDir, config.router.id, process.env.SEED_TAG))
2 changes: 1 addition & 1 deletion hsl/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { mapSrc } = require('../task/Common')
const { mapSrc } = require('../util')

module.exports = {
id: 'hsl',
Expand Down
2 changes: 1 addition & 1 deletion kela/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { mapSrc } = require('../task/Common')
const { mapSrc } = require('../util')

module.exports = {
id: 'kela',
Expand Down
4 changes: 2 additions & 2 deletions opentripplanner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ FROM hsldevcom/opentripplanner:${OTP_TAG}
ARG OTP_GRAPH_DIR
ENV OTP_GRAPH_DIR=$OTP_GRAPH_DIR

ADD entrypoint.sh /var/otp/entrypoint.sh
ADD entrypoint.sh /var/entrypoint.sh

WORKDIR /var/otp/${OTP_GRAPH_DIR}

ENTRYPOINT ["/var/otp/entrypoint.sh"]
ENTRYPOINT ["/var/entrypoint.sh"]
14 changes: 0 additions & 14 deletions task/Common.js

This file was deleted.

28 changes: 0 additions & 28 deletions task/PatchDeploymentFiles.js

This file was deleted.

13 changes: 12 additions & 1 deletion util.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,16 @@ function dirNameToDate (dirName) {
return date instanceof Date && !isNaN(date) ? date : null
}

/*
* id = feedid (String)
* url = feed url (String)
* fit = mapfit shapes (true/falsy)
* rules = OBA Filter rules to apply (array of strings or undefined)
* replacements = replace or remove file from gtfs package (format: {'file_to_replace': 'file_to_replace_with' or null})
* request options = optional special options for request
*/
const mapSrc = (id, url, fit, rules, replacements, request) => ({ id, url, fit, rules, replacements, request })

module.exports = {
zipDir: (zipFile, dir, cb) => {
zipWithGlob(zipFile, [`${dir}/*`], undefined, cb)
Expand All @@ -153,5 +163,6 @@ module.exports = {
updateSlackMessage,
otpMatching,
parseId,
dirNameToDate
dirNameToDate,
mapSrc
}
2 changes: 1 addition & 1 deletion varely/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { mapSrc } = require('../task/Common')
const { mapSrc } = require('../util')

module.exports = {
id: 'varely',
Expand Down
2 changes: 1 addition & 1 deletion waltti-alt/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { mapSrc } = require('../task/Common')
const { mapSrc } = require('../util')

module.exports = {
id: 'waltti-alt',
Expand Down
2 changes: 1 addition & 1 deletion waltti/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { mapSrc } = require('../task/Common')
const { mapSrc } = require('../util')

module.exports = {
id: 'waltti',
Expand Down

0 comments on commit 738fefb

Please sign in to comment.