Skip to content

Commit

Permalink
tmp-main
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyagr committed Aug 27, 2023
2 parents a186b5f + f3318b4 commit e524f8f
Show file tree
Hide file tree
Showing 18 changed files with 1,485 additions and 217 deletions.
15 changes: 15 additions & 0 deletions .github/scripts/docs-build-deploy
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
# Set up a virtual environment with the required tools, build, and deploy the docs.
#
# Run from the root directory of the project as
# .github/scripts/docs-build-deploy 'https://martinvonz.github.io' prerelease main
# All arguments after the first are passed to `mike deploy`, run
# `poetry run -- mike deploy --help` for options. Note that `mike deploy`
# creates a commit directly on the `gh-pages` branch.
set -ev

export "SITE_URL_FOR_MKDOCS=$1"; shift
# https://github.com/python-poetry/poetry/issues/1917
export PYTHON_KEYRING_BACKEND=keyring.backends.fail.Keyring
poetry install # Only really needed once per environment unless there are updates
poetry run -- mike deploy "$@"
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ jobs:
with:
check_filenames: true
check_hidden: true
skip: target,.jj
skip: target,.jj,*.lock
ignore_words_list: crate,nd,nD
34 changes: 34 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: website

on:
push:
branches:
- ilya-docs

permissions:
contents: write

jobs:
prerelease-docs-build-deploy:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- run: "git fetch origin gh-pages --depth=1"
- uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: latest
- name: Install dependencies, compile and deploy docs
run: |
git config user.name jj-docs-bot
git config user.email [email protected]
.github/scripts/docs-build-deploy 'https://ilyagr.github.io/jj' prerelease main --push
- name: "Show `git diff --stat`"
run: git diff --stat gh-pages^ gh-pages || echo "(No diffs)"
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,29 @@ jobs:
asset_path: ${{ env.ASSET }}
asset_name: ${{ env.ASSET }}
asset_content_type: application/octet-stream

docs-build-deploy:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- run: "git fetch origin gh-pages --depth=1"
- uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: latest
- name: Install dependencies, compile and deploy docs
run: |
git config user.name jj-docs-bot
git config user.email [email protected]
# Using the 'latest' tag below makes the website default
# to this version.
.github/scripts/docs-build-deploy 'https://ilyagr.github.io/jj' "${{ github.event.release.tag_name }}" latest --update-aliases --push
- name: "Show `git diff --stat`"
run: git diff --stat gh-pages^ gh-pages || echo "(No diffs)"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/target/
/rendered-docs
.direnv
.envrc
# generated by nix build, nix-build
Expand Down
188 changes: 14 additions & 174 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@

- [Disclaimer](#disclaimer)
- [Introduction](#introduction)
- [Status](#status)
- [Installation](#installation)
- [Command-line completion](#command-line-completion)
- [Getting started](#getting-started)
- [Status](#status)
- [Related work](#related-work)

## Disclaimer
Expand Down Expand Up @@ -44,6 +42,19 @@ If you have any questions, please join us on Discord
or start a [GitHub Discussion](https://github.com/martinvonz/jj/discussions).
The [glossary](docs/glossary.md) may also be helpful.


## Getting started

Follow the [installation instructions](docs/install-and-setup.md) to obtain and configure `jj`.

The best way to get started is probably to go through
[the tutorial](docs/tutorial.md). Also see the
[Git comparison](docs/git-comparison.md), which includes a table of
`jj` vs. `git` commands.

As you become more familiar with Jujutsu, the [FAQ](docs/FAQ.md) may help.


## Features

### Compatible with Git
Expand Down Expand Up @@ -145,177 +156,6 @@ away from `jj`). For any format changes, we'll try to implement transparent
upgrades (as we've done with recent changes), or provide upgrade commands or
scripts if requested.

## Installation

See below for how to build from source. There are also
[pre-built binaries](https://github.com/martinvonz/jj/releases) for Windows,
Mac, or Linux (musl).

### Linux

On most distributions, you'll need to build from source using `cargo` directly.

#### Build using `cargo`

First make sure that you have the `libssl-dev`, `openssl`, and `pkg-config`
packages installed by running something like this:

```shell script
sudo apt-get install libssl-dev openssl pkg-config
```

Now run:

```shell script
cargo install --git https://github.com/martinvonz/jj.git --locked --bin jj jj-cli
```

#### Nix OS

If you're on Nix OS you can use the flake for this repository.
For example, if you want to run `jj` loaded from the flake, use:

```shell script
nix run 'github:martinvonz/jj'
```

You can also add this flake url to your system input flakes. Or you can
install the flake to your user profile:

```shell script
nix profile install 'github:martinvonz/jj'
```

#### Homebrew

If you use linuxbrew, you can run:

```shell script
brew install jj
```

### Mac

#### Homebrew

If you use Homebrew, you can run:

```shell script
brew install jj
```

#### MacPorts

You can also install `jj` via [MacPorts](https://www.macports.org) (as
the `jujutsu` port):

```shell script
sudo port install jujutsu
```

([port page](https://ports.macports.org/port/jujutsu/))

#### From Source

You may need to run some or all of these:

```shell script
xcode-select --install
brew install openssl
brew install pkg-config
export PKG_CONFIG_PATH="$(brew --prefix)/opt/openssl@3/lib/pkgconfig"
```

Now run:

```shell script
cargo install --git https://github.com/martinvonz/jj.git --locked --bin jj jj-cli
```

### Windows

Run:

```shell script
cargo install --git https://github.com/martinvonz/jj.git --locked --bin jj jj-cli --features vendored-openssl
```

## Initial configuration

You may want to configure your name and email so commits are made in your name.

```shell script
$ jj config set --user user.name "Martin von Zweigbergk"
$ jj config set --user user.email "[email protected]"
```

## Command-line completion

To set up command-line completion, source the output of
`jj util completion --bash/--zsh/--fish` (called `jj debug completion` in
jj <= 0.7.0). Exactly how to source it depends on your shell.

### Bash

```shell script
source <(jj util completion) # --bash is the default
```

Or, with jj <= 0.7.0:

```shell script
source <(jj debug completion) # --bash is the default
```

### Zsh

```shell script
autoload -U compinit
compinit
source <(jj util completion --zsh)
```

Or, with jj <= 0.7.0:

```shell script
autoload -U compinit
compinit
source <(jj debug completion --zsh)
```

### Fish

```shell script
jj util completion --fish | source
```

Or, with jj <= 0.7.0:

```shell script
jj debug completion --fish | source
```

### Xonsh

```shell script
source-bash $(jj util completion)
```

Or, with jj <= 0.7.0:

```shell script
source-bash $(jj debug completion)
```

## Getting started

The best way to get started is probably to go through
[the tutorial](docs/tutorial.md). Also see the
[Git comparison](docs/git-comparison.md), which includes a table of
`jj` vs. `git` commands.

As you become more familiar with Jujutsu, the [FAQ](docs/FAQ.md) may help.

## Related work

There are several tools trying to solve similar problems as Jujutsu. See
Expand Down
6 changes: 3 additions & 3 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ You'll then need to use `jj new --before` to create new commits
and `jj move --to`
to move new changes into the correct commits.

[config]: ./config.md
[config]: config.md

[gitignore]: https://git-scm.com/docs/gitignore

[revsets]: ./revsets.md
[revsets]: revsets.md

[templates]: ./templates.md
[templates]: templates.md

[this issue]: https://github.com/martinvonz/jj/issues/1531
Loading

0 comments on commit e524f8f

Please sign in to comment.