Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: hardcode the version flag #8

Merged
merged 4 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion axolotlsay-js/dist.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "axolotlsay-js"
description = "JavaScript port of axolotlsay"
version = "0.10.0"
version = "0.10.2"
license = "MIT"
repository = "https://github.com/axodotdev/axolotlsay-hybrid"
binaries = ["axolotlsay-js"]
Expand Down
14 changes: 13 additions & 1 deletion axolotlsay-js/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
#!/usr/bin/env bun

// We do this because `require` gets rewritten to handle
// bundling properly, while the filesystem stuff that
// yargs does by default doesn't.
// If we don't do this, the default --version will be
// unable to report its own version when run outside
// the source directory.
const { version } = require("./package.json");

const yargs = require("yargs");
const { hideBin } = require("yargs/helpers");
const argv = yargs(hideBin(process.argv)).argv;
const argv = yargs(hideBin(process.argv)).version(
"--version",
"Show version number",
version,
).argv;

const msg = argv.msg;
console.log(msg);
4 changes: 2 additions & 2 deletions axolotlsay-js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion axolotlsay-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "axolotlsay",
"version": "0.10.0",
"version": "0.10.2",
"description": "> 📄 a template for axodotdev's open source repositories",
"main": "index.js",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion crates/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/axolotlsay/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "axolotlsay"
description = "💬 a CLI for learning to distribute CLIs in rust"
version = "0.10.0"
version = "0.10.2"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/axodotdev/axolotlsay-hybrid"
Expand Down