-
Notifications
You must be signed in to change notification settings - Fork 138
feat: Added feature to perform in-place update of Drifty #562
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
Merged
Merged
Changes from 48 commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
b9c1406
feat: Added ability to perform in-place update of drifty
SaptarshiSarkar12 394539b
fix: fixed Linter issue
SaptarshiSarkar12 7e1ae44
fix: fixed Drifty GUI downloading wrong update file and also fixed so…
SaptarshiSarkar12 150655b
fix: fixed CWE-248 - NumberFormatException raised by CodeQL
SaptarshiSarkar12 951cff3
Merge branch 'master' into 217-drifty-update-feature
SaptarshiSarkar12 6a5f473
Merge branch 'master' of github.com:SaptarshiSarkar12/Drifty into 217…
SaptarshiSarkar12 22bab34
feat: Added support for updating Drifty GUI and CLI based on architec…
SaptarshiSarkar12 c73c17c
style: format codebase
github-actions[bot] da19c3b
fix(CI): Fixed linter issue
SaptarshiSarkar12 79e3401
Merge branch '217-drifty-update-feature' of github.com:SaptarshiSarka…
SaptarshiSarkar12 6e5cec5
debug: Added debug window to pop-up for windows msi if there's a lack…
SaptarshiSarkar12 2bac14b
debug: Added debug window to pop-up for windows msi if there's a lack…
SaptarshiSarkar12 297ece2
fix: Fixed delay in updating Drifty GUI when the download queue is no…
SaptarshiSarkar12 d163df3
fix: Fixed delay in updating Drifty GUI when the download queue is no…
SaptarshiSarkar12 c6eed7c
Merge branch 'master' of github.com:SaptarshiSarkar12/Drifty into 217…
SaptarshiSarkar12 bc80b71
debug: Added debug window to pop-up for windows msi if there's a lack…
SaptarshiSarkar12 9240fd4
debug: Removed debug window as write permissions are apparently avail…
SaptarshiSarkar12 9dff7c2
fix: Fixed the usage of temporary drifty update directory for future …
SaptarshiSarkar12 28ddd7c
debug: Moved log file to a visible area for better monitoring of upda…
SaptarshiSarkar12 300de23
debug: Moved log file to a visible area for better monitoring of upda…
SaptarshiSarkar12 b04674b
debug: Narrow down the update failure to the code for replacing execu…
SaptarshiSarkar12 f6d5d59
debug: Narrow down the update failure to the code for replacing execu…
SaptarshiSarkar12 ada0206
debug: Added log instructions to get an idea of the permissions avail…
SaptarshiSarkar12 ea97819
fix: Fixed permission detection for windows msi
SaptarshiSarkar12 7f94067
fix: Fixed permission detection for windows, linux and mac (for mac, …
SaptarshiSarkar12 cafd6d8
fix(CI): Fixed linter issue
SaptarshiSarkar12 bf01672
style: format codebase
github-actions[bot] b33becf
fix: Fixed NullPointerException while creating log during initialization
SaptarshiSarkar12 5b435fa
Merge branch '217-drifty-update-feature' of github.com:SaptarshiSarka…
SaptarshiSarkar12 8666990
fix: Fixed unchecked admin privileges during initialization period of…
SaptarshiSarkar12 8318490
Merge branch 'master' into 217-drifty-update-feature
SaptarshiSarkar12 2a48dcc
Merge branch 'master' of github.com:SaptarshiSarkar12/Drifty into 217…
SaptarshiSarkar12 8f8ecc5
fix: Added a copy instead of move for Windows update check
SaptarshiSarkar12 edd0144
Merge branch '217-drifty-update-feature' of github.com:SaptarshiSarka…
SaptarshiSarkar12 0d21287
Merge branch 'master' into 217-drifty-update-feature
SaptarshiSarkar12 010989d
fix: Added `deleteOnExit()` command to delete '.old' executable for w…
SaptarshiSarkar12 c34abbf
Merge branch 'master' of github.com:SaptarshiSarkar12/Drifty into 217…
SaptarshiSarkar12 818da97
fix: Added a fix for exe update in windows
SaptarshiSarkar12 f6dbbca
fix(CI): Fixed linter issues
SaptarshiSarkar12 7eed5c9
Merge branch 'master' into 217-drifty-update-feature
SaptarshiSarkar12 92d81d3
fix: the old exe will get deleted now and added check for update menu…
SaptarshiSarkar12 f247169
chore: Removed the resizability of confirmation dialog
SaptarshiSarkar12 320ef2e
chore: Removed unnecessary code lines previously added for debug purp…
SaptarshiSarkar12 a097918
style: format codebase
github-actions[bot] fb404cb
fix: Fixed CoderabbitAI's reviews
SaptarshiSarkar12 6c7d831
Merge branch 'master' of github.com:SaptarshiSarkar12/Drifty into 217…
SaptarshiSarkar12 e13a1ab
fix: Fixed CoderabbitAI's reviews
SaptarshiSarkar12 3f5e869
chore: Removed the version number modification previously made solely…
SaptarshiSarkar12 b8e6204
Merge branch 'master' into 217-drifty-update-feature
SaptarshiSarkar12 667f592
Merge branch 'master' into 217-drifty-update-feature
SaptarshiSarkar12 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package cli.updater; | ||
|
||
import java.io.File; | ||
|
||
public class CLIUpdateExecutor extends updater.UpdateExecutor { | ||
public CLIUpdateExecutor(File currentExecutableFile, File latestExecutableFile) { | ||
super(currentExecutableFile, latestExecutableFile); | ||
} | ||
|
||
@Override | ||
public boolean execute() { | ||
M.msgLogInfo("Setting executable permission for the latest version of Drifty..."); | ||
if (setLatestExecutablePermissions()) { | ||
M.msgLogInfo("Executable permission set! Executing update..."); | ||
} else { | ||
M.msgUpdateError("Failed to set executable permission for the latest version of Drifty!"); | ||
return false; | ||
} | ||
cleanup(true); // This will delete the old executable created previously | ||
if (renameCurrentExecutable()) { | ||
if (replaceCurrentExecutable()) { | ||
cleanup(false); | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.