Closed GoudronViande24 closed 2 years ago
I believe this could be done so long as releases/latest will populate the expected result for you. Here is a breakdown of the changes which I anticipate will be needed. Let me know if these updates would be a viable solution for your request.
/${config.branch}/package.json
// This should work with latest tag
index.js:267 - [--branch=${branch}
] // This should work with latest tagI'm not entirely sure about step 3, but it looks exactly like what I thought.
I'm not entirely sure about step 3, but it looks exactly like what I thought.
I have added a branch for this feature request. I believe that I have accomplished what you are wanting. I do not personally work with GitHub releases. Would you be willing to complete some testing using this branch of the code and inform me if anything is not meeting expectations? The only change needed is to add "fromReleases: true" to your configuration. You continue to use the same git repo config.
https://github.com/chegele/AutoGitUpdate/tree/GitHub-releases-support
const config = {
repository: 'https://github.com/chegele/BackupPurger',
fromReleases: true, <--- NEW CONFIG EXAMPLE
tempLocation: 'C:\\Users\\scheg\\Desktop\\tmp\\',
ignoreFiles: ['util/log.js'],
executeOnComplete: 'C:\\Users\\scheg\\Desktop\\worksapce\\AutoGitUpdate\\startTest.bat',
exitOnComplete: true
}
I managed to use the main branch of my repo to publish the updates for now, but next time I publish an update I will try to implement this. I'll close for now and in case it does not work I will reopen the issue. Thank you very much for the fast response and fix!
I'm working on implementing this right now
Changed my Config object to fromReleases: true
. The setBranchToReleaseTag function is called on creating the AutoGitUpdate class, so it sends a message to the console before we are able to set the logger config with setLogConfig. Could this be fixed please?
I'm working on implementing this right now
Changed my Config object to
fromReleases: true
. The setBranchToReleaseTag function is called on creating the AutoGitUpdate class, so it sends a message to the console before we are able to set the logger config with setLogConfig. Could this be fixed please?
You should now be able to include your logging preferences in the configuration object used to create a new AutoGitUpdate instance. This will fire the updateConfig after some configuration validations and before the setBranchToReleaseTag function.
Let me know once you have tested these features. If there are no issues identified i will publish the feature to the NPM module.
Just tested, your patch for the log message works perfectly. I will finish to migrate to the /release way and I will tell you when I'm done and if everything works as expected.
It looks like it works perfectly, I think it is ready to be published.
Thank you for the awesome feature request and assistance with testing. It has been published for both versions of this module.
Basically, download files from there instead of a repo:
I don't know if this could be possible though.