Skip to content

Commit 3ee26ca

Browse files
authored
Merge pull request #2154 from digitallyinduced/update-updating-docs
Update IHP upgrade instructions and examples
2 parents 45dfda7 + cb5fbd8 commit 3ee26ca

File tree

1 file changed

+29
-30
lines changed

1 file changed

+29
-30
lines changed

Guide/updating.markdown

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,73 +6,72 @@
66

77
## Releases
88

9-
During the beta releases, there is a new release every two weeks on Friday. [You can find a list of all releases on GitHub.](https://github.com/digitallyinduced/ihp/releases).
9+
[You can find a list of all releases on GitHub.](https://github.com/digitallyinduced/ihp/releases).
1010

11-
A new version is usually announced first via the [IHP Newsletter](http://eepurl.com/g51zq1) and also on Twitter.
11+
A new version is usually announced first via the [IHP Newsletter](http://eepurl.com/g51zq1) and also on X.
1212

13-
IHP version numbers are assigned by the release date. For example, the version `v10072020` stands for the release of the `10.07.2020`.
13+
## Upgrade Instructions
14+
15+
[See UPGRADE.md](https://github.com/digitallyinduced/ihp/blob/master/UPGRADE.md) for intructions on how to upgrade your IHP project to a newer version of IHP.
1416

1517
## Updating to the Latest Release
1618

1719
To update to the current IHP version, follow the instructions [in the release notes](https://github.com/digitallyinduced/ihp/releases). It's recommended to only update a single release version at a time when there are major breaking changes between your current version and the targeted update version.
1820

1921
## Updating to the Latest Git Commit
2022

21-
To test out the latest IHP features even when they are not released yet you can update to the latest IHP git commit. For that, you need [to copy the git commit hash from the latest commit on GitHub](https://github.com/digitallyinduced/ihp/commits/master).
23+
To test out the latest IHP features even when they are not released yet you can update to the latest IHP git commit:
2224

23-
After that open the `default.nix` in your project folder. This will look like this:
25+
Open `flake.nix`. It should look like this:
2426

2527
```nix
26-
let
27-
ihp = builtins.fetchGit {
28-
url = "https://github.com/digitallyinduced/ihp.git";
29-
rev = "720a10ddfd500d5930c926c293aea5a9016acb29";
30-
};
28+
{
29+
inputs = {
30+
ihp.url = "github:digitallyinduced/ihp/v1.4";
31+
...
32+
```
3133

34+
Now drop the `/v1.4` from the `ihp.url = "github:digitallyinduced/ihp/v1.4";` such that the file looks like this:
35+
```nix
36+
{
37+
inputs = {
38+
ihp.url = "github:digitallyinduced/ihp";
3239
...
3340
```
3441

35-
Now change the git commit hash in line 4 next to `rev = ` to your chosen git commit hash.
42+
This will fetch the latest master branch from IHP.
3643

3744
Then rebuild everything by running the following:
3845

3946
```bash
40-
devenv up
47+
direnv allow
4148
```
4249

43-
When the commit you're trying out is not merged into the master branch this will fail because nix is doing only a shallow-clone of the repo. Follow the steps in "Updating to a specific Git Commit" below to fix this.
44-
4550
## Updating to a specific Git Commit
4651

4752
When the commit you're trying out is not yet merged into the master branch, follow these steps.
4853

49-
Open the `default.nix` in your project folder. This will look like this:
54+
Open the `flake.nix` in your project folder. This will look like this:
5055

5156
```nix
52-
let
53-
ihp = builtins.fetchGit {
54-
url = "https://github.com/digitallyinduced/ihp.git";
55-
rev = "720a10ddfd500d5930c926c293aea5a9016acb29";
56-
};
57-
57+
{
58+
inputs = {
59+
ihp.url = "github:digitallyinduced/ihp/v1.4";
5860
...
5961
```
6062

61-
Now change the git commit hash in line 4 next to `rev = ` to your chosen git commit hash. Also add a `ref = "*"` otherwise nix will only shallow-clone the master branch:
63+
Now change the `/v1.4` to your chosen git commit hash:
6264

63-
```nix
64-
let
65-
ihp = builtins.fetchGit {
66-
url = "https://github.com/digitallyinduced/ihp.git";
67-
rev = "... my new commit hash ...";
68-
ref = "*";
69-
};
7065

66+
```nix
67+
{
68+
inputs = {
69+
ihp.url = "github:digitallyinduced/ihp/ff63977c178a39d4e22dae82d6f3d8ba1647039e";
7170
...
7271
```
7372

7473
Then rebuild everything by running the following:
7574

7675
```bash
77-
devenv up
76+
direnv allow
7877
```

0 commit comments

Comments
 (0)