Skip to content

Commit

Permalink
build: fix release bug (#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
giladgd authored Sep 18, 2024
1 parent 253b5d6 commit b98767c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ jobs:
- name: Setup & Build
id: build
shell: bash
timeout-minutes: 160
timeout-minutes: 200
env:
ARTIFACT_NAME: ${{ matrix.config.artifact }}
run: |
Expand Down Expand Up @@ -326,13 +326,13 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx --no vite-node ./scripts/resolveNextReleaseVersion.ts --saveReleaseToFile ./semanticReleaseDryRunReleaseResult.json --saveVersionToFile ./resolvedNextVersion.txt
- name: Save next version output
run: echo "next-version=$(cat ./resolvedNextVersion.txt)" >> $GITHUB_ENV
run: echo "next-version=$(cat ./resolvedNextVersion.txt)" >> "$GITHUB_OUTPUT"
- name: Update job summary
run: |
if [ "$(cat ./resolvedNextVersion.txt)" == "false" ]; then
echo "Next release version: `N/A`" >> $GITHUB_STEP_SUMMARY
echo "Next release version: \`N/A\`" >> $GITHUB_STEP_SUMMARY
else
echo "Next release version: `$(cat ./resolvedNextVersion.txt)`" >> $GITHUB_STEP_SUMMARY
echo "Next release version: \`$(cat ./resolvedNextVersion.txt)\`" >> $GITHUB_STEP_SUMMARY
fi
- name: Upload resolved release artifact
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/chat-wrapper.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Example usage:
import {TemplateChatWrapper} from "node-llama-cpp";

const chatWrapper = new TemplateChatWrapper({
template: "{{systemPrompt}}\n{{history}}model:{{completion}}\nuser:",
template: "{{systemPrompt}}\n{{history}}model: {{completion}}\nuser: ",
historyTemplate: {
system: "system: {{message}}\n",
user: "user: {{message}}\n",
Expand Down
2 changes: 1 addition & 1 deletion scripts/resolveLatestReleaseVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const releaseRes = await fetch("https://api.github.com/repos/withcatai/node-llam
const release: Release = await releaseRes.json();

let latestReleaseVersion = release.tag_name;
if (latestReleaseVersion.startsWith("v"))
if (latestReleaseVersion.toLowerCase().startsWith("v"))
latestReleaseVersion = latestReleaseVersion.slice("v".length);

if (latestReleaseVersion === "")
Expand Down
2 changes: 0 additions & 2 deletions scripts/resolveNextReleaseVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ const res = await semanticRelease({
cwd: path.join(__dirname, "..")
});

console.log("Result:", res);

if (saveReleaseToFile != null) {
const resolvedPath = path.resolve(process.cwd(), saveReleaseToFile);

Expand Down
2 changes: 1 addition & 1 deletion src/chatWrappers/generic/TemplateChatWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export type TemplateChatWrapperOptions = {
* import {TemplateChatWrapper} from "node-llama-cpp";
*
* const chatWrapper = new TemplateChatWrapper({
* template: "{{systemPrompt}}\n{{history}}model:{{completion}}\nuser:",
* template: "{{systemPrompt}}\n{{history}}model: {{completion}}\nuser: ",
* historyTemplate: {
* system: "system: {{message}}\n",
* user: "user: {{message}}\n",
Expand Down

0 comments on commit b98767c

Please sign in to comment.