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

deploy: Simplify deployment process #234

Merged
merged 6 commits into from
Jan 6, 2024
Merged

deploy: Simplify deployment process #234

merged 6 commits into from
Jan 6, 2024

Conversation

juliaogris
Copy link
Member

@juliaogris juliaogris commented Jan 5, 2024

Simplify deployment process by copying files from frontend/** to
out/firebase/public/** once only. Copy all firebase configs to out/firebase
and run deployment from there. Clean up various little make things along the
way.

Fixes evylang/todo#47

Move `version.json` generation from `/out/public` to `/frontend`. This is a
preparatory step to remove `/out/public` as an intermittent build step: we
only ever want to serve `/frontend` directly without building or do a little
extra to suit firebase deployment, such as subdomain link replacement and
soon to come filename with hash replacements for better caching.

Also move the `version.json` generation step from `frontend` to `tinygo`
target. Now all frontend file generation happens in `tinygo` and we can
remove the frontend step in a followup commit.
Rework frontend-serve target to serve frontend rather than out/public
directory and shorten it to serve. There are no name clashes.
Remove separate `frontend` build step that copies forntend files to
out/public.
Reorder functions for readability: `update_links` calls update
`update_links_in_file` and now comes first. There is no functional change.
This is more readable if you scan the file top to bottom. The reason it
wasn't done in the first place was because I wasn't sure if I had to declare
and export the function before I could use it. I wanted to get things to work
first and then make them pretty, but forgot about making things pretty in the
end - so let's do it now.
Move deployment preparation folder from
		/firebase/; /firebase/public ->
		/out/firebase; /out/firebase/public.

Now /firebase only contains source files and almost all generated files and
build output are in the out directory.
Copy link
Member

@camh- camh- left a comment

Choose a reason for hiding this comment

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

🥒

Simplify deploy target naming, drop `firebase-` prefix - we only ever deploy
to firebase:

	firebase-deploy.      -> deploy
	firebase-deploy-prod  -> deploy-prod
	firebase-deploy-stage -> deploy stage

Less typing, less confusion.
@juliaogris juliaogris merged commit cd0fb92 into main Jan 6, 2024
3 checks passed
@juliaogris juliaogris deleted the firebase branch January 6, 2024 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move firebase deployment prep location
2 participants