Skip to content

Commit

Permalink
netlify: always use real version
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamingwynn committed Apr 3, 2024
1 parent 837b075 commit 8ff75e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions build/common.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ export function getVersion() {
const result = cproc.execSync(command).toString()
return result.trim() || fallback
}

export function getVersionReal() {
const command = `git describe --tags --abbrev=0`
return cproc.execSync(command).toString().trim()
}
4 changes: 2 additions & 2 deletions build/netlify.mjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/** @format */

import fsp from "fs/promises"
import {getVersion} from "./common.mjs"
import {getVersionReal} from "./common.mjs"

function makeDownloadUrl(tag) {
return `https://github.com/benjamingwynn/cv/releases/download/${tag}/cv-2024-${tag}.pdf`
}

const url = makeDownloadUrl(getVersion())
const url = makeDownloadUrl(getVersionReal())
const html = `
<!doctype html>
<head>
Expand Down

0 comments on commit 8ff75e4

Please sign in to comment.