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

Finish upgrading Elixir #515

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.8'

services:
devcontainer:
image: ghcr.io/thechangelog/changelog-runtime:elixir-v1.14.5-erlang-v26.2-nodejs-v20.10.0
image: ghcr.io/thechangelog/changelog-runtime:elixir-v1.16.3-erlang-v26.2.5-nodejs-v20.14.0
volumes:
- ../:/workspace
network_mode: service:db
Expand Down
18 changes: 9 additions & 9 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
direnv 2.34.0
elixir 1.16.2
erlang 26.2.2
golang 1.22.1
nodejs 20.11.1
yarn 1.22.19
postgres 16.2
flyctl 0.2.25
1password-cli 2.26.1
1password-cli 2.29.0
dagger 0.6.4
direnv 2.34.0
elixir 1.16.3
erlang 26.2.5
flyctl 0.2.65
golang 1.22.4
nodejs 20.14.0
postgres 16.3
yarn 1.22.22
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ Create a new pull request via https://github.com/thechangelog/changelog.com

You will need to have the following dependencies installed:
- [PostgreSQL](https://www.postgresql.org/download/) v16
- [Elixir](https://elixir-lang.org/install.html) v1.14
- [Elixir](https://elixir-lang.org/install.html) v1.16
- [Erlang/OTP](https://www.erlang.org/downloads) v26 - usually installed as an Elixir dependency
- [Node.js](https://nodejs.org/en/download/) v20 LTS - [latest-v20.x](https://nodejs.org/download/release/latest-v20.x/)
- [Yarn](https://yarnpkg.com/getting-started/install) v1.22
- [Golang](https://go.dev/doc/install) v1.20 - if you want to run CI locally
- [Golang](https://go.dev/doc/install) v1.22 - if you want to run CI locally

We are using [`asdf`](https://asdf-vm.com/) to install the correct dependency versions in our development environment.

Expand Down Expand Up @@ -147,7 +147,7 @@ mix test
- If a new version gets installed, run `asdf local erlang <INSTALLED_VERSION>`
2. Repeat previous step for Elixir & Node.js
3. Commit & push to check that image builds successfully in GitHub Actions
- _Alternatively_, build the image locally via: `{ cd magefiles && go run main.go -w ../ image:runtime }`
- _Alternatively_, build the image locally via: `$(cd magefiles && go run main.go -w ../ image:runtime)`

After you confirm that the image builds successfully:
1. Update `.devcontainer/docker-compose.yml` with new image tag
Expand All @@ -164,7 +164,7 @@ A pre-configured Codespace can be launched for this repo by following the instru

```console
# CONFIGURE APP
mix deps.get
mix deps.get_dev
mix ecto.setup

# CONFIGURE STATIC ASSETS
Expand Down
2 changes: 1 addition & 1 deletion magefiles/image/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (image *Image) PublishRuntime() *Image {

func (image *Image) WithRuntimeLabels() *Image {
description := fmt.Sprintf(
"💜 Elixir v%s | 🚜 Erlang v%s | ⬢ Node.js v%s | 🐡 Ubuntu %s | %s",
"💜 Elixir v%s | 🚜 Erlang v%s | ⬢ Node.js v%s | 🗃️ Ubuntu %s | %s",
image.versions.Elixir(),
image.versions.Erlang(),
image.versions.Nodejs(),
Expand Down
27 changes: 17 additions & 10 deletions magefiles/tools/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,44 +23,51 @@ func CurrentVersions() *Versions {
return &Versions{
toolVersions: toolVersions(),
Ubuntu: Ubuntu{
// https://hub.docker.com/r/hexpm/elixir/tags?page=1&ordering=last_updated&name=ubuntu-jammy
Short: "jammy-20240125",
Long: "22.04 LTS (Jammy Jellyfish)",
// https://hub.docker.com/r/hexpm/elixir/tags?page=1&ordering=last_updated&name=ubuntu-noble
Short: "noble-20240429",
Long: "24.04 LTS (Noble Numbat)",
},
}
}

// https://github.com/elixir-lang/elixir/releases || asdf list all elixir
// https://github.com/elixir-lang/elixir/releases
// asdf list all elixir
func (v *Versions) Elixir() string {
return v.toolVersions["elixir"]
}

// https://github.com/erlang/otp/releases || asdf list all erlang
// https://github.com/erlang/otp/releases
// asdf list all erlang
func (v *Versions) Erlang() string {
return v.toolVersions["erlang"]
}

// https://nodejs.org/en/download/releases/ || asdf list all nodejs
// https://nodejs.org/en/download/releases
// asdf list all nodejs
func (v *Versions) Nodejs() string {
return v.toolVersions["nodejs"]
}

// https://www.postgresql.org/docs/release/ || asdf list all postgres
// https://www.postgresql.org/docs/release
// asdf list all postgres
func (v *Versions) Postgres() string {
return v.toolVersions["postgres"]
}

// https://github.com/yarnpkg/yarn/releases || asdf list all yarn
// https://github.com/yarnpkg/yarn/releases
// asdf list all yarn
func (v *Versions) Yarn() string {
return v.toolVersions["yarn"]
}

// https://github.com/superfly/flyctl/releases || asdf list all flyctl
// https://github.com/superfly/flyctl/releases
// asdf list all flyctl
func (v *Versions) Flyctl() string {
return v.toolVersions["flyctl"]
}

// https://app-updates.agilebits.com/product_history/CLI2 || asdf list all 1password-cli
// https://app-updates.agilebits.com/product_history/CLI2
// asdf list all 1password-cli
func (v *Versions) OnePassword() string {
return v.toolVersions["1password-cli"]
}
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defmodule Changelog.Mixfile do
[
app: :changelog,
version: System.get_env("APP_VERSION", "0.0.1"),
elixir: "~> 1.14",
elixir: "~> 1.16",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
Expand Down
Loading