-
Notifications
You must be signed in to change notification settings - Fork 44
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
Allow for easier version updates on an existing project #187
Comments
Update the proposed solution use use
All though there will be other project files in the project root besides the gls (gitpod-laravel-starter) files so there may need to be a selective copy to isolate the existing gls files in order to compare them with the gls release. |
First step of the update probably will be getting the latest release and logging the changed files. One appraoch to this first step could be to create a working directory for the update/comparison by downloading the latest release into via So something like this: gls_latest_ver="1.4.0"
gls_url="https://github.com/apolopena/gitpod-laravel-starter/archive/refs/tags/v$gls_latest_ver.tar.gz"
gls_tar="${gls_url##*/}"
tmp_d="tmp_update_gls"
mkdir -p "$tmp_d"
cd "$tmp_d"
wget "$gls_url" -no--verbose
tar -xvzf "$gls_tar" && rm "$gls_tar"
rsync -naic ../ "gitpod-laravel-starter-$gls_latest_ver/" |
Can't wait for when the update process gets easier.... Thanks for this feature :-) |
This is the work in progress:
|
What do you think about adding an install option to the update script? Example, you have developed a Laravel project so far completely without GitPod. You used the standard Laravel directory structure. Now you download your script, it detects that the .gp folder and the other files are not present and completely loads the Laravel Starter into the existing Laravel structure. Just as an idea... |
I like it, I put it on the map, thanks. @strausmann The pre-release version of bash <( curl -fsSL https://raw.githubusercontent.com/apolopena/gls-tools/main/tools/install.sh ) |
@strausmann
|
Getter closer! Not yet ready for release though. |
Problem this feature will solve
As it stands a project built on this project will use the files from this project but with no real ties to the repository itself. As a result of this, any project built on this project can break if Gitpod changes something (like a major version of php or mysql) in their workspace-full, base or mysql image.
Users needs an easier way to update
gitpod-laravel-starter
such as via a script.Background
This project is built on Gitpods https://github.com/gitpod-io/workspace-images/tree/master/mysql
This project has intnetionally not pinned down the workspace image so that users can benefit for the updates that Gitpod provides however this can also break a users project.
Allowing a user to pin just their their Gitpod workspace image version would be amazing but technically I do not think that it is possible to do dynamically. A user could do this on thier own if they new what they were doing.
Proposed Solution
Create a system that will update the
gitpod-laravel-starter
to the latest version or possibly even allow a user to swap to whatever version ofgitpod-laravel-starter
they like.As a first attempt at writing this system we can make of three files:
manifest.sh
.gls-manifest
.gls-manifest
(autogenerated and .gitignored)update-core.sh
is run.update-core.sh
.gls-manifest
Constraints and Assumptions
<! -- Any constraints and/or assumption relevant for the development and use of this feature? -->
Some core files will most likely be edited by the user and those files should be omitted when the
gitpod-laravel-starter
version is updated/swapped.Technically the user should only be changing the files that were designed to be changed by the user which are
init-project.sh
andinstall-project-packages.sh
and whatever 'user editable' files this project will provide in the future.If a user was given the ability to omit certain files from the update then the project could easily break. However if the user knows what they are doing they will be able to merge their changes into the updated files and everything will be fine.
Warn the user that they may need to merge changes at their own risk if they have changed any of the
gitpod-laravel-starter
core files such as.gitpod.yml
and.gitpod.Dockerfile
Alternatives or Workarounds
Make the version update/swap manually by deleting the existing
gitpod-laravel-starter
files and then replacing them with new files for the repository.Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: