scittle/doc/dev.md
Michiel Borkent 2f9d68d118 v0.1.2
2022-02-25 10:53:56 +01:00

60 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Dev
## Release
Static files including compiled JS are hosted on Github. This is set up like
described
[here](https://medium.com/linagora-engineering/deploying-your-js-app-to-github-pages-the-easy-way-or-not-1ef8c48424b7):
All the commands below assume that you already have a git project initialized and that you are in its root folder.
```
# Create an orphan branch named gh-pages
git checkout --orphan gh-pages
# Remove all files from staging
git rm -rf .
# Create an empty commit so that you will be able to push on the branch next
git commit --allow-empty -m "Init empty branch"
# Push the branch
git push origin gh-pages
```
Now that the branch is created and pushed to origin, lets configure the worktree correctly:
```
# Come back to master
git checkout main
# Add gh-pages to .gitignore
echo "gh-pages/" >> .gitignore
git worktree add gh-pages gh-pages
```
After cloning this repo to a new dir:
```
git fetch origin gh-pages
git worktree add gh-pages gh-pages
```
To deploy to Github Pages:
```
bb release
```
To create a new release:
To upgrade examples:
```
rg '0.0.1' --files-with-matches | xargs sed -i '' 's/0.0.1.2.1.0/g'
bb release
cd gh-pages
git checkout -b v0.1.2
git push --set-upstream origin v0.1.2
git checkout gh-pages
cd ..
```
Then make a new release on Github with the `v0.1.2` tag.