Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

fix: version validation #410

Merged
merged 1 commit into from Jul 22, 2019
Merged

fix: version validation #410

merged 1 commit into from Jul 22, 2019

Conversation

jhellar
Copy link
Contributor

@jhellar jhellar commented Jul 19, 2019

Copy link
Contributor

@darahayes darahayes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, the original logic here is pretty hacky. Another option would be to assume node is always available and do something similar to version=$(PACKAGE=$PACKAGE node -e 'console.log(require(process.env.package)).version')

The syntax probably has issues but I'm sure you get the idea!

@wtrocki
Copy link
Contributor

wtrocki commented Jul 19, 2019

For maintenance over the future we can simply use node.js codebase instead of bash so it will be easier to track issues and test it.

@jhellar
Copy link
Contributor Author

jhellar commented Jul 19, 2019

@darahayes I came up with something like this version=$(package=$package node -e 'console.log(require(\'./packages/\' + process.env.package.replace(\'@aerogear/\', \'\') + \'/package.json\').version)') - which looks quite ugly, the packages are not yet published&installed, so I was not able to use require(process.env.package).

@wtrocki do you mean rewriting all the bash scripts to js? would it be ok to create just github issue for it for now?

@wtrocki
Copy link
Contributor

wtrocki commented Jul 19, 2019

@jhellar yes. Do not get that we need to rewrite those, but we can practically have some simple mixed bash/node scripts for certain tasks. This is executed in node.js environment so we can assume that node is installed. It will be also easy to reuse this as we can publish all release scripts as package. Now I'm replicating those across 9 different repositories. Any custom release cases can be nicely coded in node.

@darahayes
Copy link
Contributor

darahayes commented Jul 19, 2019

For maintenance over the future we can simply use node.js codebase instead of bash so it will be easier to track issues and test it.

It will be also easy to reuse this as we can publish all release scripts as package.

On these two points: I am +10000 on solving the problem we have with duplication of release/build/deployment tooling across repos. However I think we should not jump to the immediate conclusion that the solution is a package. I think this is something we could spike or at least have a discussion about to explore our options.

@wtrocki
Copy link
Contributor

wtrocki commented Jul 20, 2019

I meant to have helpers package for validating versions and all other stuff that is hard in bash. We can still have bash scripts for the rest.

@jhellar jhellar merged commit 04bb8d5 into aerogear:master Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants