Skip to content

Commit

Permalink
chore: try to get gem version for push
Browse files Browse the repository at this point in the history
  • Loading branch information
markphelps committed Dec 26, 2023
1 parent 56932a6 commit 4705244
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ func rubyBuild(ctx context.Context, client *dagger.Client, hostDirectory *dagger
container := client.Container().From("ruby:3.1-bookworm").
WithWorkdir("/app").
WithDirectory("/app", hostDirectory.Directory("flipt-client-ruby")).
WithExec([]string{"export", "GEM_VERSION=$(cat /app/lib/flipt_client/version.rb | grep VERSION | cut -d' ' -f 5 | tr -d ')"}).
WithDirectory("/app/lib/ext", hostDirectory.Directory("tmp")).
WithExec([]string{"bundle", "install"}).
WithExec([]string{"bundle", "exec", "rake", "build"})
Expand All @@ -222,7 +223,7 @@ func rubyBuild(ctx context.Context, client *dagger.Client, hostDirectory *dagger

_, err = container.
WithSecretVariable("GEM_HOST_API_KEY", gemHostAPIKeySecret).
WithExec([]string{"gem", "push", "/app/pkg/flipt_client-*.gem"}).
WithExec([]string{"gem", "push", "/app/pkg/flipt_client-${GEM_VERSION}.gem"}).
Sync(ctx)

return err
Expand Down

0 comments on commit 4705244

Please sign in to comment.