Giter Club home page Giter Club logo

xgoreleaser's Introduction

oryd/xgoreleaser

This image is published as oryd/xgoreleaser. It's tag (e.g. 1.13.5) reflects the Golang version used. This is a fork of docker/golang-cross. Alternatives include:

Build in CI

First, check the versions for:

The use this workflow to build and publish the image. Do not use v prefixes in the version!

Workflow parameters

Using the Build Tempalte

# Include the base config
includes:
  - from_url:
      url: https://raw.githubusercontent.com/ory/xgoreleaser/master/build.tmpl.yml

variables:
  # The name of the brew tap formula:
  # 
  # brew install ory/tap/<brew_name>
  brew_name: cli

  # The description of the brew formula:
  brew_description: ""
  
  # The variable where we store the build's git hash
  buildinfo_hash: "github.com/ory/cli/buildinfo.GitHash"

  # The variable where we store the build's version
  buildinfo_tag: "github.com/ory/cli/buildinfo.Version"

  # The variable where we store the build's time
  buildinfo_date: "github.com/ory/cli/buildinfo.Time"


# The name of the project (e.g. kratos, ory, ...). Used
# to name the binary, docker images, etc.
project_name: ory

Building Locally

To build this image, run locally:

# Enable Docker experimental features and buildx
export DOCKER_CLI_EXPERIMENTAL=enabled
docker buildx create --use

go_version=1.17.5
goreleaser_version=1.1.0
docker buildx build \
  --load \
  --build-arg GO_VERSION=${go_version} --build-arg GORELEASER_VERSION=${goreleaser_version} \
  --platform linux/amd64 \
  -t oryd/xgoreleaser:${go_version}-${goreleaser_version} \
  -t oryd/xgoreleaser:latest \
  .

To build this image using the CI, create a new release with the desired Golang version.

Testing Builds

You can test a build using

docker pull --platform linux/amd64 oryd/xgoreleaser:latest
docker run --mount type=bind,source="$(pwd)",target=/project \
    --platform linux/amd64 \
    -e GORELEASER_KEY=$GORELEASER_KEY \
    -v /var/run/docker.sock:/var/run/docker.sock \
    oryd/xgoreleaser:latest --skip-publish --snapshot --rm-dist

or exec into the container:

docker run --mount type=bind,source="$(pwd)",target=/project \
  --platform linux/amd64 \
  -e GORELEASER_KEY=$GORELEASER_KEY \
  -v /var/run/docker.sock:/var/run/docker.sock \
  --entrypoint /bin/bash -it oryd/xgoreleaser:latest

Updating Dependencies

Go tends to remove support for older macOS SDKs which requires re-packaging and uploading the macOS SDK to Google Cloud. To learn how to package it, check out this guide. Next, upload the generated file and mark it public in this Google Cloud Storage Bucket.

Updating Build Template

The build template is ingested by all projects (e.g. Ory Kratos) and modified slightly to fit the needs of the project.

xgoreleaser's People

Contributors

aeneasr avatar icyphox avatar benehiko avatar zepatrik avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.