mirror of
https://codeberg.org/gothub/docs
synced 2024-12-06 19:16:44 +01:00
ldflags
This commit is contained in:
@@ -16,12 +16,19 @@ You need to clone the repository. You can do this by running the following comma
|
||||
|
||||
```bash
|
||||
git clone https://codeberg.org/gothub/gothub.git
|
||||
git checkout master
|
||||
```
|
||||
|
||||
If you want to run the bleeding edge, in exchange for having to deal with occasional bugs, run the following command:
|
||||
|
||||
```bash
|
||||
git checkout dev
|
||||
```
|
||||
|
||||
Then, you need to build the binary. You can do this by running the following command:
|
||||
|
||||
```bash
|
||||
go build
|
||||
go build -ldflags="-X codeberg.org/gothub/gothubs/utils.Branch=$(git rev-parse --abbrev-ref HEAD)"
|
||||
```
|
||||
|
||||
## Configuration
|
||||
@@ -50,4 +57,4 @@ GotHub's CLI has a command to update GotHub. You can run this command by running
|
||||
./gothub update
|
||||
```
|
||||
|
||||
It will try to pull from Git and then rebuild the binary. If it doesn't work, just run ``git pull`` and then ``go build``.
|
||||
It will try to pull from Git and then rebuild the binary. If it doesn't work, just run ``git pull`` and then ``go build``.
|
||||
|
||||
Reference in New Issue
Block a user