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

Remove v8, build on Mac and update to v15 #48

Merged
merged 28 commits into from
Feb 7, 2025
Merged

Conversation

CarlSargunar
Copy link
Contributor

@CarlSargunar CarlSargunar commented Jan 7, 2025

  • Update the latest project to v15
  • Remove the v8 version of the site
  • Update and rename v13 site so all names are consistent
  • Check it builds on all environments

@CarlSargunar CarlSargunar marked this pull request as draft January 7, 2025 18:05
@CarlSargunar CarlSargunar marked this pull request as ready for review January 7, 2025 23:36
@CarlSargunar
Copy link
Contributor Author

CarlSargunar commented Jan 10, 2025

While this works on windows for me, I tried it again on my M1, and I'm getting this building the v15 backoffice

Error: Cannot find module @rollup/rollup-darwin-arm64. npm has a bug related to optional dependencies (npm/cli#4828). Please try npm i again after removing both package-lock.json and node_modules directory.

The suggested fix doesn't work, looking into why

@CarlSargunar
Copy link
Contributor Author

This looks to work well on windows, if it makes sense it might be an idea to merge this in for the restructure, and I'll sort out my build issues. From what I've read into it, It might be an issue of which architecture of node I have installed

@ronaldbarendse ronaldbarendse force-pushed the feature/build-on-mac branch 2 times, most recently from 5d8ddee to c92ebf9 Compare February 6, 2025 22:20
@ronaldbarendse
Copy link
Collaborator

Awesome work @CarlSargunar 💪🏻 I've put in some extra work as well and updated the following:

  • Moved example/test sites from samples to examples folder, solution files to repository root and removed unused files
  • Added a global.json file to specify a minimum .NET SDK version (9.0.100) and nuget.config file to only fetch NuGet packages from nuget.org
  • Use Central Package Management and global packages (although most package references now use VersionOverride due to the mixed v13/v15 projects)
  • The Our.Umbraco.UiExamples.v15 project is now a Razor Class Library and the packaged NuGet package actually contains the client assets, which are automatically build using MSBuild targets
  • The @umbraco-cms/backoffice NPM package is also updated to v15 and all compilation errors fixed
  • Finally, the GitHub Actions workflows are updated to build the v15 NuGet package and the NPM issue is fixed (at least now works locally on Windows and on Ubuntu in the CI/CD build)

I'm curious what people think of the MSBuild targets approach, as this should ensure you can simply checkout the source and run the test sites (which automatically restores NuGet and NPM packages and builds both .NET and TypeScript code).

The GitHub Actions should also make releasing new versions easier: manually running the Prepare release workflow will create a new release branch (with updated or removed prerelease tag) and bump the version on the develop branch. Once the release preparation is done on the release branch, running the Publish release workflow will correctly tag the latest commit on that release branch, which can be used to create a GitHub release. After publishing the GitHub release, a new build will be created and pushed to NuGet.

I'd still like to automate creating a draft GitHub release and use an existing build to push to NuGet, but that's something for later!

@Rockerby Rockerby merged commit 1db9fcd into develop Feb 7, 2025
1 check passed
@Rockerby
Copy link
Contributor

Rockerby commented Feb 7, 2025

Awesome work team! It was a good experience spinning these up from scratch on both Mac and Windows.

@ronaldbarendse ronaldbarendse deleted the feature/build-on-mac branch February 7, 2025 10:59
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.

3 participants