Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release by GitAction #118

Merged
merged 15 commits into from Nov 13, 2021
Merged

Release by GitAction #118

merged 15 commits into from Nov 13, 2021

Conversation

Nice3point
Copy link
Collaborator

@Nice3point Nice3point commented Nov 13, 2021

Summary of the Pull Request

What is this about:
Automatic release creation

Description:
Chenzhlog is automatically picked up from here https://github.com/jeremytammik/RevitLookup/blob/dev/Doc/Changelog.md

The version is picked up from here https://github.com/jeremytammik/RevitLookup/blob/dev/RevitLookup/RevitLookup.csproj#L8

The release will not be generated if there is an existing one with the same version. The feature is enabled for the master branch. For everyone else, the project will simply compile to check pull requests

Now the version style will be as follows:

  • Dll version - 2022.0.2.5
  • Installer name - 2022.0.2.5
  • Installer version - 22.0.2.5 (displayed only in the control panel and used for updates)

Quality Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@Nice3point
Copy link
Collaborator Author

Nice3point commented Nov 13, 2021

@ricaun see the changes, maybe you have your own vision 😉
Build/Build.GitHubRelease.cs file with new feature

@Nice3point Nice3point changed the title Dev Release by GitAction Nov 13, 2021
@Nice3point
Copy link
Collaborator Author

Nice3point commented Nov 13, 2021

@ricaun the major version of the installer must be up to 255. 2022 does not fall into this range. Therefore, the version number of the installer will be 22.0.0.0, and the file name will be 2022.0.0.0 (as well as the dll version). I did it so as not to break the current versioning, as requested by Jeremy

@Nice3point
Copy link
Collaborator Author

@ricaun i fixed this part of the code 307a054

@ricaun
Copy link
Contributor

ricaun commented Nov 13, 2021

@ricaun the major version of the installer must be up to 255. 2022 does not fall into this range. Therefore, the version number of the installer will be 22.0.0.0, and the file name will be 2022.0.0.0 (as well as the dll version). I did it so as not to break the current versioning, as requested by Jeremy

This is an installer(msi) limitation, right? =(

@Nice3point
Copy link
Collaborator Author

@ricaun
Copy link
Contributor

ricaun commented Nov 13, 2021

@ricaun yes it is Windows standard https://docs.microsoft.com/en-us/windows/win32/msi/productversion

I only use .exe and does not have this 255 limitation... This is annoying.

@Nice3point
Copy link
Collaborator Author

Nice3point commented Nov 13, 2021

Any more suggestions? mb add logging of some more code fragments? if not i merge the branches

@ricaun
Copy link
Contributor

ricaun commented Nov 13, 2021

maybe Microsoft will remove this limitation sometime) now the version style will be as follows: dll version - 2022.0.2.5 installer name - 2022.0.2.5 installer version - 22.0.2.5 (displayed only in the control panel and used for updates)

Maybe without the 20 was fine all along, and only add 20 on the release tag. To make the DLL installer name and installer version the same number. This gonna make the code much simpler.

@Nice3point
Copy link
Collaborator Author

I only use .exe and does not have this 255 limitation... This is annoying.

is your option of creating an exe installer a manual creation of a configuration file? WixSharp does it automatically, so far I haven't seen a better way)

@ricaun
Copy link
Contributor

ricaun commented Nov 13, 2021

I only use .exe and does not have this 255 limitation... This is annoying.

is your option of creating an exe installer a manual creation of a configuration file? WixSharp does it automatically, so far I haven't seen a better way)

Only manual creation using Inno Setup, WixSharp is great to automate the installer creation.

In the end, does not matter too much, the end-user never gonna notice if the DLL version is 2022 or 22.

@Nice3point
Copy link
Collaborator Author

Maybe without the 20 was fine all along, and only add 20 on the release tag. To make the DLL installer name and installer version the same number. This gonna make the code much simpler.

I didn't quite understand how 20 will simplify the code, can you show an example? or send a PR to the dev branch? in the method that searches for the productversion of the dll file, I trim the extra digits to conform to the microsoft standard. And when I form the name of the file, I return them back. Maybe just substitute the original version in the file name and not combine 20 with the cropped part

@Nice3point
Copy link
Collaborator Author

@ricaun

did this:

var version = GetAssemblyVersion(args, out var dllVersion);
var outFileNameBuilder = new StringBuilder().Append(OutputName).Append("-").Append(dllVersion);

in out I get the original version of the dll file

@ricaun
Copy link
Contributor

ricaun commented Nov 13, 2021

@ricaun

did this:

var version = GetAssemblyVersion(args, out var dllVersion);
var outFileNameBuilder = new StringBuilder().Append(OutputName).Append("-").Append(dllVersion);

in out I get the original version of the dll file

In my point of view, you are over-engineering 😄

https://github.com/ricaun/RevitLookup/blob/e039e0224b8a77628b86ec0be8cde86a2d8771a6/Build/Build.GitHubRelease.cs#L38

https://github.com/ricaun/RevitLookup/blob/e039e0224b8a77628b86ec0be8cde86a2d8771a6/Installer/Installer.cs#L86-L97

And the version of the DLL stay like 22.0.2.6

@Nice3point
Copy link
Collaborator Author

And the version of the DLL stay like 22.0.2.6

the whole point was to, if possible, leave the 2022 version of the version where possible) there is no limitation in the version for dll)

@ricaun
Copy link
Contributor

ricaun commented Nov 13, 2021

And the version of the DLL stay like 22.0.2.6

the whole point was to, if possible, leave the 2022 version of the version where possible) there is no limitation in the version for dll)

Yes I know but why change.?

@Nice3point
Copy link
Collaborator Author

The release is being formed perfectly) I also cut off the extra text from the changelog
изображение
изображение

@Nice3point
Copy link
Collaborator Author

Yes I know but why change.?

The version was originally 2022, which I changed to 22 when I added the build system. Now it turned out to return the old style of naming)

@ricaun
Copy link
Contributor

ricaun commented Nov 13, 2021

Yes I know but why change.?

The version was originally 2022, which I changed to 22 when I added the build system. Now it turned out to return the old style of naming)

Perfect, I was thinking the original was 22 instead of 2022.

@Nice3point Nice3point merged commit ffcb4eb into master Nov 13, 2021
@ricaun
Copy link
Contributor

ricaun commented Nov 13, 2021

Great work @Nice3point 👍

@Nice3point
Copy link
Collaborator Author

Nice3point commented Nov 13, 2021

Thanks) You can add the signing of the msi file so that Windows SmartScreen does not throw a warning, at the same time you will practice with Nuke) I'll add these features to my templates later. And add options when creating

@Nice3point
Copy link
Collaborator Author

Nice3point commented Nov 13, 2021

@jeremytammik Now changes to the master branch will create a new release. Or if it exists the pipeline will fail. Therefore, use the dev branch, and merge with master only if you think you need to create a new release. Also, before merging, you need to remember to update the changelog and upgrade the version😉

@jeremytammik
Copy link
Owner

okey-doke. impressive automation, very complete. wow. thank you, @Nice3point and @ricaun for all your enthusiasm and efforts! i wonder if this conversation and these many insights are of interest and use to other Revit add-in developers as well, and should be documened or summarised on the blog... what do you think?

@Nice3point
Copy link
Collaborator Author

Nice3point commented Nov 13, 2021

I think not, this is just a convenience for the users. Developers should not touch this code, it is not related to the development of this plugin. The only rule is that you do not accept PR in the master branch. But I think it can be blocked by the YML file, I will do it later. All documentation is here https://github.com/jeremytammik/RevitLookup#installation And the information for you, as the owner of the repository, is in the description for this PR 😉

@jeremytammik
Copy link
Owner

brilliant, thank you very much! i wish you a good night and a pleasant sunday!

@Nice3point
Copy link
Collaborator Author

Nice3point commented Nov 13, 2021

@jeremytammik Once again, I will repeat the steps that you must take to publish:

@Nice3point
Copy link
Collaborator Author

brilliant, thank you very much! i wish you a good night and a pleasant sunday!

And thank you too)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants