Skip to content

Commit

Permalink
add downloadBinariesUrl to config
Browse files Browse the repository at this point in the history
  • Loading branch information
TimurRin committed Jul 22, 2024
1 parent 3680c13 commit 644fd7c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion anca.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"dataVersion": 0,
"version": {
"latest": "0.1.0-dev",
"timestamp": 1720199005
"latestNext": "0.1.0-dev+next.20240722_062523",
"timestamp": 1721629523
},
"files": [
{
Expand Down
7 changes: 5 additions & 2 deletions src/actions/readme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,13 @@ function getContents(development: AncaDevelopment) {
const binName = development.state.meta?.name;
const packageName = packageJson.name ?? "app";

if (development.state.config.type === "app") {
if (
development.state.config.type === "app" &&
development.state.config.downloadBinariesUrl
) {
lines.push(`### Binary`);
lines.push(
`[Get the latest binaries](https://example.com/github/user/app-name/releases/latest).`,
`[Get the latest binaries](${development.state.config.downloadBinariesUrl}).`,
);
lines.push(
`If you want to use the app with a command line, rename it to \`${binName}\` or \`${binName}.exe\` and add the location to \`PATH\`.`,
Expand Down
4 changes: 4 additions & 0 deletions src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export interface AncaConfig {
authors?: AncaConfigAuthor[];
deployment?: AncaDeploymentConfig;
development?: AncaDevelopmentConfig;
downloadBinariesUrl?: string;
organizations?: AncaConfigOrganization[];
stack?: AncaConfigStack;
type?: AncaConfigType;
Expand Down Expand Up @@ -286,6 +287,9 @@ export const ANCA_CONFIG_SCHEMA = {
},
type: "object",
},
downloadBinariesUrl: {
type: "string",
},
stack: {
enum: ["nodejs", "unsupported"],
type: "string",
Expand Down

0 comments on commit 644fd7c

Please sign in to comment.