mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
Two build directories exist and their names are one character apart, which is
how one of them got scanned as source by a test earlier today:
.build/ the RELEASE bundle, from `meteor build .build --directory`.
.build/bundle is what is deployed, tested and packaged.
_build/ rspack's compiled output, written by ANY Meteor compile. Meteor reads
the app's main modules from _build/main-prod/, so it is a HANDOFF,
not a leftover - which is why .meteorignore must NOT ignore it, as
the note in that file has said since the Meteor 3.4 migration.
Both are now described where somebody meets them: the build.sh and build.bat
headers, Directory-Structure.md, Build-from-source.md, Meteor-bundle.md,
Build-and-Create-Pull-Request.md (as "what not to add to a pull request"), and
CLAUDE.md/AGENTS.md - the last with the warning that _build holds a bundled
second copy of every source file, so anything walking the repository must skip
it. That is not hypothetical; a source-scanning test read it and reported the
bundler's rewritten imports as a source file breaking a rule.
_build was in .gitignore and .meteorignore only. It is now in .dockerignore,
.eslintignore and .prettierignore too.
The same pass aligned the rest. Nothing in client/, server/, models/, imports/,
config/ or packages/ imports anything from docs/, meta/, old-CHANGELOG/,
openapi/, sandstorm-src/, snap-src/, snap-base-debian/, stacksmith/, releases/,
scripts/, tools/ or secrets/ - checked, not assumed - so Meteor no longer
watches them. It watches what it does not ignore, one inotify watch per
directory, against a per-user limit shared with every other watcher on the
machine: the same limit .tools/ was added for. The Docker context no longer
carries them either, since everything in it is sent to the daemon whether the
image uses it or not.
Four things are deliberately NOT ignored, each for a reason now written down:
config/ is imported by the app in nine places; private/ and public/ are Meteor's
own asset directories; packages/ holds the local Meteor packages; and _build/
breaks the build if ignored. releases/ stays in the Docker context because the
Dockerfile COPYs several scripts out of it.
.meteorignore now also ignores .build/, which answers a warning Meteor prints on
every release build - "The output directory is under your source tree. Your
generated files may get interpreted as source code!" Unlike _build/, nothing
hands .build/ back to the compiler; it is finished output read by the deploy and
test steps.
Thanks to xet7 !
116 lines
3.3 KiB
Markdown
116 lines
3.3 KiB
Markdown
# Build WeKan and Create Pull Request
|
|
|
|
WeKan currently uses Meteor 3.
|
|
|
|
## Before you commit: what not to add
|
|
|
|
A build writes two directories, both generated and both gitignored. Neither ever
|
|
belongs in a pull request:
|
|
|
|
- **`.build/`** — the release bundle, from `meteor build .build --directory`.
|
|
`.build/bundle` is what gets deployed, tested and packaged.
|
|
- **`_build/`** — rspack's compiled output, written by any Meteor compile. Meteor
|
|
reads the app's main modules from `_build/main-prod/`, so it is a handoff
|
|
rather than a leftover. It is gitignored, but must **not** be added to
|
|
`.meteorignore`: ignoring it breaks the build.
|
|
|
|
`git status` should never list either. If it does, the checkout's ignore files
|
|
are out of date rather than the directories being something new — see
|
|
[Directory-Structure.md](Directory-Structure.md).
|
|
|
|
Using newest Ubuntu amd64:
|
|
|
|
# Meteor 3
|
|
|
|
### 1. Install git and configure it
|
|
```
|
|
sudo apt -y install git
|
|
|
|
git config --global user.name "YOUR-FIRSTNAME YOUR-LASTNAME"
|
|
|
|
git config --global user.email YOUR-EMAIL-ADDRESS@gmail.com
|
|
|
|
git config --global push.default simple
|
|
|
|
nano .ssh/config
|
|
```
|
|
There add your User (GitHub username) and IdentityFile (Your ssh private key. Not public key that has .pub).
|
|
For indentation, use one tab.
|
|
```
|
|
Host *
|
|
IdentitiesOnly=yes
|
|
|
|
Host github.com
|
|
Hostname github.com
|
|
User YOUR-GITHUB-USERNAME
|
|
IdentityFile ~/.ssh/id_github
|
|
```
|
|
Save and Exit with Ctrl-o Enter Ctrl-x Enter
|
|
|
|
If you do not have ssh key, create it:
|
|
```
|
|
ssh-keygen -t ed25519 -f ~/.ssh/id_github
|
|
```
|
|
And press Enter about 3 times, until you have private key at `~/.ssh/id_github` and public key at `~/.ssh/id_github.pub`
|
|
|
|
Add public key `.pub` to your GitHub SSH Keys at https://github.com/settings/keys
|
|
|
|
### 2. Click Create fork at https://github.com/wekan/wekan webpage
|
|
|
|
```
|
|
mkdir repos
|
|
|
|
cd repos
|
|
|
|
git clone git@github.com:YOUR-GITHUB-USERNAME/wekan.git
|
|
|
|
cd wekan
|
|
```
|
|
|
|
### IMPORTANT: Do NOT `npm audit fix --force`
|
|
|
|
Because it downgrades @meteorjs/rspack and breaks builds.
|
|
|
|
### 3. Install dependencies, build WeKan, and run the dev server
|
|
|
|
`build.sh` shows a two-level menu. The top level is `1) Setup 2) Dev server 3) Tests 4) Docker 5) Tools 6) Quit`; pick a category number, then the item number inside it (each submenu also has a `Back` entry).
|
|
|
|
```
|
|
# Setup -> Install dependencies
|
|
./build.sh
|
|
1 # Setup
|
|
1 # Install dependencies
|
|
|
|
# Setup -> Build WeKan
|
|
./build.sh
|
|
1 # Setup
|
|
2 # Build WeKan
|
|
|
|
# Dev server -> localhost:3000
|
|
./build.sh
|
|
2 # Dev server
|
|
1 # localhost:3000
|
|
```
|
|
That does:
|
|
- **Setup -> Install dependencies** installs dependencies,
|
|
- **Setup -> Build WeKan** builds wekan,
|
|
- **Dev server -> localhost:3000** starts wekan in development mode with command `meteor`, so it can detect if some file changes and try to rebuild automatically. If a dev server is already running on that port, it is stopped first and a fresh one started on the same port.
|
|
|
|
And then [register and login](../Features/Login/Adding-users.md) with webbrowser at http://localhost:3000
|
|
|
|
### 4. Make and test your changes
|
|
|
|
Use `build.sh` to run all tests.
|
|
|
|
### 5. If it works, create pull request
|
|
|
|
When your changes work, commit them:
|
|
```
|
|
git add --all
|
|
|
|
git commit -m "Describe your change here."
|
|
|
|
git push
|
|
```
|
|
And then at your GitHub for `https://github.com/YOUR-GITHUB-USERNAME/wekan` click `Create pull request`.
|