# 3  Containerizing and Publishing against specific Bioconductor release versions

## 3.1 For a {`BiocBook`} package not currently in Bioconductor

One can build against older Bioconductor releases as follows:

- Commit current changes before switching branches (should be in `devel` branch)

``` r
gert::git_commit_all("Commit current changes")
```

- Create a new branch named `RELEASE_X_Y` and checkout

``` r
gert::git_branch_create("RELEASE_3_17")
```

- Push local `RELEASE_X_Y` to Github

``` r
gert::git_push()
```

## 3.2 For a {`BiocBook`} package accepted in Bioconductor \> 6 months ago

Once your package is accepted in Bioconductor, your repository will have access to a new **remote** named `upstream`, pointing to `git@git.bioconductor.org`. When Bioconductor releases a new version, your package will change version on the `upstream` remote, in a dedicated release branch `RELEASE_X_Y`. All details are available [here](https://contributions.bioconductor.org/git-version-control.html).

To generate a Docker image and a version of the `BiocBook` website built on new Bioconductor releases, you can:

- Add the `Bioconductor` remote to your local repository (this might already be set up)

``` r
gert::git_remote_add(name = 'upstream', url = 'git@git.bioconductor.org:packages/<YOUR-REPOSITORY>.git')
```

- Create a new local `RELEASE_X_Y` branch

``` r
gert::git_branch_create("RELEASE_3_15")
```

- Pull the `upstream` `RELEASE_X_Y` commits

``` r
gert::git_pull("RELEASE_3_15", remote = "upstream")
```

- Push the local `RELEASE_X_Y` branch to `origin` remote (your own Github repository)

``` r
gert::git_push("RELEASE_3_15", remote = "origin")
```

## 3.3 Serving the book to AI assistants

Each deployed version of the book also serves an `llms.txt` file and a Markdown copy of every page, which AI assistants can read instead of crawling its HTML pages: see [sec-ai](#sec-ai).

## 3.4 Session info

``` r
sessioninfo::session_info()
```
