mirror of https://github.com/Hilbis/Hilbish
Compare commits
5 Commits
c6c81ddece
...
caff604d95
Author | SHA1 | Date |
---|---|---|
sammyette | caff604d95 | |
sammyette | 2b9059f726 | |
sammyette | 00c967d7c1 | |
TorchedSammy | ab26b82a9f | |
sammyette | f540fc2c04 |
|
@ -21,27 +21,27 @@ jobs:
|
||||||
|
|
||||||
- name: Set branch name
|
- name: Set branch name
|
||||||
id: branch
|
id: branch
|
||||||
run: echo "::set-output name=BRANCH_NAME::${GITHUB_REF##*/}"
|
run: echo "BRANCH_NAME=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: Fix base URL
|
- name: Fix base URL
|
||||||
if: steps.branch.outputs.BRANCH_NAME != 'master' && github.repository_owner == 'Rosettea'
|
if: env.BRANCH_NAME != 'master' && github.repository_owner == 'Rosettea'
|
||||||
run: sed -i "s%baseURL = 'https://rosettea.github.io/Hilbish/'%baseURL = 'https://rosettea.github.io/Hilbish/versions/${{ steps.branch.outputs.BRANCH_NAME }}'%" website/config.toml
|
run: sed -i "s%baseURL = 'https://rosettea.github.io/Hilbish/'%baseURL = 'https://rosettea.github.io/Hilbish/versions/${{ env.BRANCH_NAME }}'%" website/config.toml
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: 'cd website && hugo --minify'
|
run: 'cd website && hugo --minify'
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
if: steps.branch.outputs.BRANCH_NAME == 'master' && github.repository_owner == 'Rosettea'
|
if: env.BRANCH_NAME == 'master' && github.repository_owner == 'Rosettea'
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./website/public
|
publish_dir: ./website/public
|
||||||
keep_files: true
|
keep_files: true
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
if: steps.branch.outputs.BRANCH_NAME != 'master' && github.repository_owner == 'Rosettea'
|
if: env.BRANCH_NAME != 'master' && github.repository_owner == 'Rosettea'
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./website/public
|
publish_dir: ./website/public
|
||||||
destination_dir: versions/${{ steps.branch.outputs.BRANCH_NAME }}
|
destination_dir: versions/${{ env.BRANCH_NAME }}
|
||||||
keep_files: true
|
keep_files: true
|
||||||
|
|
2
api.go
2
api.go
|
@ -2,6 +2,7 @@
|
||||||
// The Hilbish module includes the core API, containing
|
// The Hilbish module includes the core API, containing
|
||||||
// interfaces and functions which directly relate to shell functionality.
|
// interfaces and functions which directly relate to shell functionality.
|
||||||
// #field ver The version of Hilbish
|
// #field ver The version of Hilbish
|
||||||
|
// #field goVersion The version of Go that Hilbish was compiled with
|
||||||
// #field user Username of the user
|
// #field user Username of the user
|
||||||
// #field host Hostname of the machine
|
// #field host Hostname of the machine
|
||||||
// #field dataDir Directory for Hilbish data files, including the docs and default modules
|
// #field dataDir Directory for Hilbish data files, including the docs and default modules
|
||||||
|
@ -110,6 +111,7 @@ func hilbishLoad(rtm *rt.Runtime) (rt.Value, func()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
util.SetFieldProtected(fakeMod, mod, "ver", rt.StringValue(getVersion()))
|
util.SetFieldProtected(fakeMod, mod, "ver", rt.StringValue(getVersion()))
|
||||||
|
util.SetFieldProtected(fakeMod, mod, "goVersion", rt.StringValue(runtime.Version()))
|
||||||
util.SetFieldProtected(fakeMod, mod, "user", rt.StringValue(username))
|
util.SetFieldProtected(fakeMod, mod, "user", rt.StringValue(username))
|
||||||
util.SetFieldProtected(fakeMod, mod, "host", rt.StringValue(host))
|
util.SetFieldProtected(fakeMod, mod, "host", rt.StringValue(host))
|
||||||
util.SetFieldProtected(fakeMod, mod, "home", rt.StringValue(curuser.HomeDir))
|
util.SetFieldProtected(fakeMod, mod, "home", rt.StringValue(curuser.HomeDir))
|
||||||
|
|
|
@ -13,6 +13,7 @@ interfaces and functions which directly relate to shell functionality.
|
||||||
|
|
||||||
## Interface fields
|
## Interface fields
|
||||||
- `ver`: The version of Hilbish
|
- `ver`: The version of Hilbish
|
||||||
|
- `goVersion`: The version of Go that Hilbish was compiled with
|
||||||
- `user`: Username of the user
|
- `user`: Username of the user
|
||||||
- `host`: Hostname of the machine
|
- `host`: Hostname of the machine
|
||||||
- `dataDir`: Directory for Hilbish data files, including the docs and default modules
|
- `dataDir`: Directory for Hilbish data files, including the docs and default modules
|
||||||
|
|
Loading…
Reference in New Issue