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

feat: Added support for updating Drifty #316

Closed
wants to merge 84 commits into from

Conversation

kmr-rohit
Copy link

@kmr-rohit kmr-rohit commented Oct 23, 2023

Fixes issue

Fixes #217

Changes proposed

Created Updater Package, Updated Main files for GUI & CLI, in order to check Updates and Download the latest available update using GitHub API.

Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • My change requires changes to the documentation.
  • I have updated the documentation accordingly.
  • This PR does not contain plagiarized content.
  • The title of my pull request is a short description of the requested changes.

Screenshots

Note to reviewers

Summary by CodeRabbit

  • New Features

    • Introduced a new search functionality with a search bar and results display.
    • Added a new UPDATE mode and related functionalities to the application.
    • Implemented a new Updater class for handling executable updates.
    • Added progress bar enhancements in the GUI to show more detailed download information.
  • Enhancements

    • Improved operating system detection with new utility methods.
    • Streamlined file copying and permission setting in the backend.
    • Updated GUI forms to reflect changes in auto-paste settings.
    • Enhanced logging with timestamp formatting and update-specific messages.
  • Bug Fixes

    • Fixed issues with file name handling in the Job class.
    • Corrected message display conditions based on the application's update mode.
  • Refactor

    • Renamed methods and enums for clarity and consistency across the codebase.
    • Simplified build workflow steps in the CI/CD pipeline.
  • Documentation

    • Added package-level comments to the "Preferences" package.
  • Style

    • Made minor whitespace and comment adjustments in various files.
  • Chores

    • Removed unused methods and fields in GUI forms.
    • Cleaned up import statements across several classes.

@vercel
Copy link

vercel bot commented Oct 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
drifty ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 7, 2023 11:29am

@github-actions github-actions bot added the App 💻 Issues/Pull Requests which update Drifty Application Code label Oct 23, 2023
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Yeah! You did it 🎉 Now, Relax 😉, Grab a drink ☕, and wait for the maintainers to check your contributions. Meanwhile, you can discuss on other issues and solve them 😀. Thank You 😃!

Meanwhile you can also discuss about the project in our Discord Server 😀

@SaptarshiSarkar12 SaptarshiSarkar12 changed the title Update Feature Implementation feat: Added support for updating Drifty Oct 23, 2023
Copy link
Owner

@SaptarshiSarkar12 SaptarshiSarkar12 left a comment

Choose a reason for hiding this comment

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

@kmr-rohit Please do not commit any executables.

Copy link
Owner

@SaptarshiSarkar12 SaptarshiSarkar12 left a comment

Choose a reason for hiding this comment

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

@kmr-rohit The updater will be an isolated class in a separate package. Please check the below steps that drifty will follow for updating :

  • Check if update is available
  • If yes, download it according to the OS
  • Download the updater (this will contain the Updater class which will take two arguments - the current path along with executable name from which old drifty is running and the path where the latest executable has been downloaded; These will be command line arguments, and not direct passing of parameters)
  • The old Drifty will exit and the updater will start
  • The updater will replace the old one with the new one and it will start the new one

Copy link
Owner

@SaptarshiSarkar12 SaptarshiSarkar12 left a comment

Choose a reason for hiding this comment

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

@kmr-rohit Please make the below requested changes.
Also, please note that the name of the updater executable built will be

  • For windows ➡️ updater.exe
  • For macOS ➡️ updater_macos
  • For linux ➡️ updater_linux

and can be downloaded from:

  • For windows ➡️ https://github.com/SaptarshiSarkar12/Drifty/releases/latest/download/updater.exe
  • For Linux ➡️ https://github.com/SaptarshiSarkar12/Drifty/releases/latest/download/updater_linux
  • For macOS ➡️ https://github.com/SaptarshiSarkar12/Drifty/releases/latest/download/updater_macos

src/main/java/CLI/Main.java Outdated Show resolved Hide resolved
src/main/java/CLI/Main.java Outdated Show resolved Hide resolved
src/main/java/CLI/Main.java Outdated Show resolved Hide resolved
src/main/java/CLI/Main.java Outdated Show resolved Hide resolved
src/main/java/CLI/Main.java Outdated Show resolved Hide resolved
src/main/java/CLI/Main.java Outdated Show resolved Hide resolved
src/main/java/Updater/Updater.java Show resolved Hide resolved
src/main/java/Updater/Updater.java Outdated Show resolved Hide resolved
src/main/java/Updater/Updater.java Outdated Show resolved Hide resolved
src/main/java/Updater/Updater.java Outdated Show resolved Hide resolved
Copy link
Author

@kmr-rohit kmr-rohit left a comment

Choose a reason for hiding this comment

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

I have implemented the requested changes, please check and let me know if further any change is required. Thank You @SaptarshiSarkar12

@SaptarshiSarkar12
Copy link
Owner

@kmr-rohit This PR needs to be closed as no major changes have yet been made and there is a ton of conflicts which if resolved, does not help much. So, if you are interested in working on this issue, you need to open a separate PR.
Does that look good to you?

@SaptarshiSarkar12
Copy link
Owner

@kmr-rohit I am closing this PR because of inactivity. If you want to work on this, please reopen this PR.

@SaptarshiSarkar12 SaptarshiSarkar12 added the invalid This doesn't seem right label Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App 💻 Issues/Pull Requests which update Drifty Application Code CI/CD 🔁 Pull Requests which update GitHub Actions code dependencies 📦️ Pull Requests that update dependencies feature ✨ New feature request or addition invalid This doesn't seem right maven 📦️ Pull Requests that update Maven dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Add a feature to update Drifty
3 participants