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

feat(ci): deb package on release #518

Merged
merged 9 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from 6 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
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ jobs:
pattern: artifacts-*
path: target/distrib/
merge-multiple: true

- name: Cargo Deb
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't get it. i thought we still haven't discussed if it is our responsibility to maintain packages

i am making a code suggestion here so that this will be a discussion so it can be minimized when resolved

ref #294

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this at least be in a different repo in the organization? i'm pretty sure there is a million ways to get the tool to pull code from it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually projects release the package for the various distro, in a different repo I think that is the case when the project will grrow.
Right now I can be the debian maintainer, as the package it is just the binarry generated from rust in a dedicated compressed package, is not something like for Nix.

Copy link
Member

@b1ek b1ek Oct 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in a different repo I think that is the case when the project will grrow

normally i would agree to move it later, but files urls in releases are something people will use in scripts, so its not very good to modify or remove them. so it has to be moved there right away.

why even have it in the compiler repo? i don't think there is a valid reason for having it here rather than in a separate one

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debian packages are easy to use and not that hard to maintain. I see the reason to support just the most popular distributions so that we can maintain a good experience of the installation process.

run: |
cargo install cargo-deb
cargo deb --output="./target/distrib"
- name: Compile installer/uninstaller
run: |
TARGET_TRIPLE="$(rustc -Vv | awk '/^host/ { print $2 }')"
Expand All @@ -192,6 +195,8 @@ jobs:
# Parse out what we just built and upload it to scratch storage
echo "paths<<EOF" >> "$GITHUB_OUTPUT"
jq --raw-output ".upload_files[]" dist-manifest.json >> "$GITHUB_OUTPUT"
AMBER_VERSION=$($AMBER --version)
echo "$PWD/target/distrib/amber_${AMBER_VERSION}-1_amd64.deb" >> "$GITHUB_OUTPUT"
echo "$PWD/target/distrib/install.sh" >> "$GITHUB_OUTPUT"
echo "$PWD/target/distrib/uninstall.sh" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
Expand Down
9 changes: 8 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@
name = "amber"
version = "0.3.5-alpha"
edition = "2021"
repository = "https://github.com/Ph0enixKM/Amber"
repository = "https://github.com/amber-lang/Amber"
homepage = "https://amber-lang.com/"
description = "The Programming Language compiled to Bash."
rust-version = "1.79"

[package.metadata.deb]
maintainer = "Amber-Lang project"
license-file = "LICENSE.md"
copyright = "GPLv3"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
Expand Down