Skip to content

Commit

Permalink
Add DEVELOPMENT.md file
Browse files Browse the repository at this point in the history
  • Loading branch information
akash-akya committed Nov 10, 2023
1 parent 2cacb44 commit 194f8d4
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Development

## Publishing new package to Hex without pre-built libvips binary changes

* Bump version and push to master branch

* Create new release at: https://github.com/akash-akya/vix/releases.
Github Actions and TravisCI creates pre-compiled NIF artifacts and push to the release.
Wait for all the release to be available. Ensure artifacts are created for all Beam
NIF versions, like `2.16`, `2.17`

* On local machine, remove existing pre-built package cache and checksum file `rm -rf cache/ priv/* checksum.exs`

* Remove existing compiled files `rm -rf _build/*/lib/vix`

* Generate `checksum.exs` by running:
`ELIXIR_MAKE_CACHE_DIR="$(pwd)/cache" MIX_ENV=prod mix elixir_make.checksum --all`
This downloads all available artifacts and generates `checksum.exs` file based on it.
Check checksum file contents

* Run test to ensure pre-built package pass the test `ELIXIR_MAKE_CACHE_DIR="$(pwd)/cache" mix test`

* Publish Hex package. `mix hex.publish`


## Updating pre-built libvips to match with upstream

Repo: https://github.com/akash-akya/sharp-libvips/

* Pull latest **stable** upstream changes

* Apply patches from our repo

* Create a matching tag and push. The tag commit must match to avoid issues

* Github Actions creates a new release based on the tag

* Ensure all required aftifacts are created

* Update release_tag in the `precompiler.exs`

* Test by setting `export VIX_COMPILATION_MODE=PRECOMPILED_LIBVIPS`

* Once tested, commit to master and publish new version

0 comments on commit 194f8d4

Please sign in to comment.