diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 50b17cea4e..ad7d4f147b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -153,3 +153,38 @@ jobs: RELEASE_TAG_NAME: ${{ github.event.release.tag_name }} - name: "Show `git diff --stat`" run: git diff --stat gh-pages^ gh-pages || echo "(No diffs)" + + copr-build: + runs-on: ubuntu-24.04 + permissions: + contents: read + + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 + with: + persist-credentials: false + - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c + with: + python-version: 3.11 + - name: Install uv + uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d + with: + version: "0.5.1" + - name: Write version to copr.spec + run: | + VERSION=${RELEASE_TAG_NAME#v} + # needs the tag to be 'v' + sed -i "s/{{version}}/$VERSION/" copr.spec + env: + RELEASE_TAG_NAME: ${{ github.event.release.tag_name }} + - name: Start COPR build + run: | + # setup copr-cli auth + echo "[copr-cli]" > ~/.config/copr + echo "login = ${{ secrets.COPR_LOGIN }}" >> ~/.config/copr + echo "username = jujutsu" >> ~/.config/copr + echo "token = ${{ secrets.COPR_TOKEN }}" >> ~/.config/copr + echo "copr_url = https://copr.fedorainfracloud.org" >> ~/.config/copr + chmod 600 ~/.config/copr + + uvx --from=copr-cli==2.3 copr-cli build jujutsu/jj-cli copr.spec --enable-net=on --nowait diff --git a/copr.spec b/copr.spec new file mode 100644 index 0000000000..3cb525ed8f --- /dev/null +++ b/copr.spec @@ -0,0 +1,34 @@ +Name: jj-cli +Version: {{version}} +Release: %{autorelease} +Summary: A Git-compatible VCS that is both simple and powerful + +License: Apache-2.0 +URL: https://github.com/jj-vcs/jj +Source0: https://github.com/jj-vcs/jj/archive/refs/tags/v%{version}.tar.gz + +BuildRequires: rust >= 1.88 +BuildRequires: cargo >= 1.88 + +Recommends: git + +%description +Jujutsu is a powerful version control system for software projects. You use it to get a copy of your code, track changes to the code, and finally publish those changes for others to see and use. It is designed from the ground up to be easy to use—whether you're new or experienced, working on brand new projects alone, or large scale software projects with large histories and teams. + +Jujutsu is unlike most other systems, because internally it abstracts the user interface and version control algorithms from the storage systems used to serve your content. This allows it to serve as a VCS with many possible physical backends, that may have their own data or networking models—like Mercurial or Breezy, or hybrid systems like Google's cloud-based design, Piper/CitC. + +%prep +%autosetup -C + +%build +cargo build --release --locked + +%install +install -Dm755 %{_builddir}/%{buildsubdir}/target/release/jj %{buildroot}%{_bindir}/jj + +%files +%license LICENSE +%{_bindir}/jj + +%changelog +%autochangelog diff --git a/docs/install-and-setup.md b/docs/install-and-setup.md index 18c671396f..619d722487 100644 --- a/docs/install-and-setup.md +++ b/docs/install-and-setup.md @@ -112,6 +112,15 @@ emerge -av dev-vcs/jj zypper install jujutsu ``` +#### Fedora + +`jj-cli` can be installed from the Jujutsu [Fedora COPR](https://copr.fedorainfracloud.org/coprs/jujutsu/jj-cli) repository: + +```shell +sudo dnf copr enable jujutsu/jj-cli +sudo dnf install jj-cli +``` + ### Mac #### From Source