Skip to content

Custom self-set version of package? #2429

Answered by mrgrain
ognjen-andric asked this question in Q&A
Discussion options

You must be logged in to vote

projen's release system is definitely not setup for this. 😅 But there are ways to work around it.

This will set a version to an explicit string:

project.package.addVersion('1.2.3-banana');

Now build should give you a releaseable artifact with the correct version number, somewhere in dist:

projen build

Finally you need to adjust the release workflows and/or tasks to only do something like

npm publish dist/js/my-package-1.2.3-banana.tgz

Let me know if that works for you!

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mrgrain
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #2428 on February 09, 2023 15:45.