Skip to content

Commit c48721b

Browse files
committed
chore(cli): Prepare for publishing
The CLI was previously published by building an AOT executable and bundling with platform-dependent methods. This was nice for improving performance but suffers from requiring a lot of infrastructure and having a non-zero cost. With the open-sourcing of the CLI, we'll publish to pub.dev, sacrificing some cost but making installation a single `dart pub global activate` command. - Removes old release code - Updates `pubspec.yaml` to support publishing to pub.dev
1 parent 41a966b commit c48721b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+98
-2855
lines changed

.github/workflows/celest_cli.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ jobs:
4949
- name: Setup Libsecret
5050
if: runner.os == 'Linux'
5151
run: tool/setup-ci.sh
52+
- name: Setup Melos
53+
run: dart pub global activate melos
54+
- name: Get Packages
55+
run: melos bootstrap
5256
- name: Get Packages
5357
working-directory: apps/cli
5458
run: dart pub upgrade

apps/cli/.pubignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fixtures/

apps/cli/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
## 0.1.0
1+
## 1.0.7
22

3-
- Initial version.
3+
- Initial open-source release.

apps/cli/LICENSE

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
Copyright (c) Dillon Nys
2+
3+
Redistribution and use in source and binary forms, with or without modification,
4+
are permitted provided that the following conditions are met:
5+
6+
1. Redistributions of source code must retain the above copyright notice, this
7+
list of conditions and the following disclaimer.
8+
9+
2. Redistributions in binary form must reproduce the above copyright notice,
10+
this list of conditions and the following disclaimer in the documentation and/or
11+
other materials provided with the distribution.
12+
13+
Subject to the terms and conditions of this license, each copyright holder and
14+
contributor hereby grants to those receiving rights under this license a
15+
perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
16+
(except for failure to satisfy the conditions of this license) patent license to
17+
make, have made, use, offer to sell, sell, import, and otherwise transfer this
18+
software, where such license applies only to those patent claims, already
19+
acquired or hereafter acquired, licensable by such copyright holder or
20+
contributor that are necessarily infringed by:
21+
22+
(a) their Contribution(s) (the licensed copyrights of copyright holders and
23+
non-copyrightable additions of contributors, in source or binary form) alone; or
24+
25+
(b) combination of their Contribution(s) with the work of authorship to which
26+
such Contribution(s) was added by such copyright holder or contributor, if, at
27+
the time the Contribution is added, such addition causes such combination to be
28+
necessarily infringed. The patent license shall not apply to any other
29+
combinations which include the Contribution.
30+
31+
Except as expressly stated above, no rights or licenses from any copyright
32+
holder or contributor is granted under this license, whether expressly, by
33+
implication, estoppel or otherwise.
34+
35+
DISCLAIMER
36+
37+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND
38+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
39+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
40+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE
41+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
42+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
43+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
44+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
45+
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
46+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

apps/cli/lib/src/version.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import 'package:celest_cli/src/utils/run.dart';
22
import 'package:pub_semver/pub_semver.dart';
33

4-
const String _version = '1.0.6+2';
4+
const String _version = '1.0.7';
55

66
final String packageVersion = run(() {
77
const override = String.fromEnvironment('celest.version');
8-
if (override.isEmpty) {
9-
return _version;
8+
if (override.isNotEmpty) {
9+
Version.parse(override); // Trigger a format exception if invalid.
10+
return override;
1011
}
11-
Version.parse(override); // Trigger a format exception if invalid.
12-
return override;
12+
return _version;
1313
});

0 commit comments

Comments
 (0)