Commit Graph

9 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
dac566e75e refactor: move all shellcheck disable definitions to .shellcheckrc file
This makes standard use of shellcheck work without needing to provide extra configuration anywhere.

Also remove use of inline 'shellcheck disable' calls that are already defined in the .shellcheckrc and don't need to be set inline.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
70a1b6a863 fix: checkout the deploy branch when initializing a new repo
The initial-branch flag only works on newer versions of git - 2.28.0+ - and the init.defaultBranch config is otherwise also ignored until then.
2023-05-28 05:38:57 -04:00
Jose Diaz-Gonzalez
1a320eafad fix: add missing hook creation before clone
In the case where a repository is new, the check to see if it is an empty repo during clone fails. We therefore create the initial repo via the fn-git-create-hook call when initializing the repo.
2023-05-28 03:10:45 -04:00
Jose Diaz-Gonzalez
8faa338bd4 fix: ensure users can push from an image-deploy repository and respect deploy-branch
Previously, we created this weird bare repo that didn't do set all the normal git config. This change switches to cloning the local temp directory, fixing the `receive.denyCurrentBranch` property that blocked pushing to this weird bare repo after calling git:from-image or git:from-archive.

Additionally, since we now use a git clone, we set the default branch correctly, ensuring git pushes later on that branch work as expected (and not on master if it was customized prior to app creation).

Closes #5601
Closes #5662
2023-05-28 03:10:45 -04:00
Jose Diaz-Gonzalez
fd2c540cd5 fix: exit non-zero when git:from-image deploys fail to start the app
Also ensure the repository doesn't get updated to an invalid state in those failure cases.

Closes #5538
2022-12-27 02:37:30 -05:00
Jose Diaz-Gonzalez
8083ff6584 feat: update error for git:from- commands when the artifact is already synced
Closes #4520
2021-03-25 20:38:38 -04:00
Jose Diaz-Gonzalez
06bc6b9012 fix: ensure existing apps are initialized before modifying with code
Prior to 0.24.0, not all applications would have their repositories initialized. This was especially the case for tags and tarball deploys.

This state is now correctly detected and the repository is initialized as expected.

Closes #4485
2021-03-21 01:32:31 -04:00
Jose Diaz-Gonzalez
5c1a1baf08 feat: implement git:from-archive
The previous tar support lacked the ability to track changes between tarball deploys. Critically, it also failed to be handled correctly when there was _also_ a git deployment done on the app, resulting in odd deployment states depending on the angles of the moon and the sun in the sky.

Rather than try to "fix" this through some hokey mechanism, importing the tar file contents into the git repository is preferred, as then the user can refer to the repository for commit history.

Additionally, we add support for non-tar files (tar.gz and zip), enabling deployments from systems that do not create tar files, such as Github (their tarball url is a tar.gz file).

Finally, this deprecates the tar plugin, and sets it to be removed in the next minor release (in addition to the tags plugin).

Closes #3458
Closes #4207
2021-03-01 08:13:51 -05:00
Jose Diaz-Gonzalez
0a31f6fe3a feat: add git:from-image support
The new command superscedes the previous tags plugin, and integrates docker image deployment with the general build process.

While `docker image load` is not supported, this otherwise completely handles all previous workflows supported by the `tags:deploy` command, while doing so in a much easier to use interface.

Closes #4296
2021-03-01 02:26:58 -05:00