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

Add prefix app to build and deploy app commands #1360

Merged
merged 2 commits into from
Mar 4, 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
6 changes: 3 additions & 3 deletions .github/workflows/alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
run: |
echo $FIREBASE_HOSTING_KEY > firebase-hosting-key.json
export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/firebase-hosting-key.json
sz deploy web \
sz deploy app web \
--stage alpha \
--message "Workflow $GITHUB_JOB, commit $GITHUB_SHA" \
--flavor ${{ matrix.environment.flavor }}
Expand Down Expand Up @@ -252,7 +252,7 @@ jobs:
# parsing in the shell, potentially leading to incorrect handling of
# the multiline string argument.

sz deploy ios \
sz deploy app ios \
--stage alpha \
--whats-new "$SHORT_LAST_COMMIT_MESSAGE" \
--export-options-plist=$HOME/export_options.plist
Expand Down Expand Up @@ -309,6 +309,6 @@ jobs:
# longer than 4000 characters.
SHORT_LAST_COMMIT_MESSAGE=${LAST_COMMIT_MESSAGE:0:4000}

sz deploy macos \
sz deploy app macos \
--stage alpha \
--whats-new "$SHORT_LAST_COMMIT_MESSAGE"
8 changes: 4 additions & 4 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
CHANGELOG="${{ github.event.inputs.ios-changelog }}"
CHANGELOG_WITH_NEW_LINES=$(echo -e "$CHANGELOG" | sed 's/\\n/\\n/g')

sz deploy ios \
sz deploy app ios \
--stage beta \
--whats-new "$CHANGELOG_WITH_NEW_LINES" \
--export-options-plist=$HOME/export_options.plist
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
run: |
echo $FIREBASE_HOSTING_KEY > firebase-hosting-key.json
export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/firebase-hosting-key.json
sz deploy web \
sz deploy app web \
--stage beta \
--message "Workflow $GITHUB_JOB, commit $GITHUB_SHA" \
--flavor ${{ matrix.environment.flavor }}
Expand Down Expand Up @@ -201,7 +201,7 @@ jobs:
CHANGELOG="${{ github.event.inputs.android-changelog }}"
CHANGELOG_WITH_NEW_LINES=$(echo -e "$CHANGELOG" | sed 's/\\n/\\n/g')

sz deploy android \
sz deploy app android \
--stage beta \
--whats-new "$CHANGELOG_WITH_NEW_LINES" \
--rollout-percentage ${{ github.event.inputs.android-rollout-percentage }}
Expand Down Expand Up @@ -252,6 +252,6 @@ jobs:
CHANGELOG="${{ github.event.inputs.macos-changelog }}"
CHANGELOG_WITH_NEW_LINES=$(echo -e "$CHANGELOG" | sed 's/\\n/\\n/g')

sz deploy macos \
sz deploy app macos \
--stage beta \
--whats-new "$CHANGELOG_WITH_NEW_LINES"
8 changes: 4 additions & 4 deletions .github/workflows/stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
CHANGELOG="${{ github.event.inputs.ios-changelog }}"
CHANGELOG_WITH_NEW_LINES=$(echo -e "$CHANGELOG" | sed 's/\\n/\\n/g')

sz deploy ios \
sz deploy app ios \
--stage stable \
--whats-new "$CHANGELOG_WITH_NEW_LINES" \
--export-options-plist=$HOME/export_options.plist
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
run: |
echo $FIREBASE_HOSTING_KEY > firebase-hosting-key.json
export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/firebase-hosting-key.json
sz deploy web \
sz deploy app web \
--stage stable \
--message "Workflow $GITHUB_JOB, commit $GITHUB_SHA" \
--flavor ${{ matrix.environment.flavor }}
Expand Down Expand Up @@ -203,7 +203,7 @@ jobs:
CHANGELOG="${{ github.event.inputs.android-changelog }}"
CHANGELOG_WITH_NEW_LINES=$(echo -e "$CHANGELOG" | sed 's/\\n/\\n/g')

sz deploy android \
sz deploy app android \
--stage stable \
--whats-new "$CHANGELOG_WITH_NEW_LINES" \
--rollout-percentage ${{ github.event.inputs.android-rollout-percentage }}
Expand Down Expand Up @@ -254,6 +254,6 @@ jobs:
CHANGELOG="${{ github.event.inputs.macos-changelog }}"
CHANGELOG_WITH_NEW_LINES=$(echo -e "$CHANGELOG" | sed 's/\\n/\\n/g')

sz deploy macos \
sz deploy app macos \
--stage stable \
--whats-new "$CHANGELOG_WITH_NEW_LINES"
2 changes: 1 addition & 1 deletion .github/workflows/unsafe_app_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ jobs:
- name: Build web app
working-directory: app
run: |
sz build web \
sz build app web \
--flavor dev \
--stage preview

Expand Down
2 changes: 1 addition & 1 deletion tools/sz_repo_cli/lib/src/commands/commands.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

export 'src/analyze_command.dart' show AnalyzeCommand;
export 'src/deploy_command.dart';
export 'src/deploy_web_app_command.dart';
export 'src/deploy_app_web_command.dart';
export 'src/do_stuff_command.dart';
export 'src/exec_command.dart';
export 'src/fix_comment_spacing_command.dart' show FixCommentSpacingCommand;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ final _androidOutputType = [
'apk',
];

class BuildAndroidCommand extends CommandBase {
BuildAndroidCommand(super.context) {
class BuildAppAndroidCommand extends CommandBase {
BuildAppAndroidCommand(super.context) {
argParser
..addOption(
releaseStageOptionName,
Expand Down
19 changes: 19 additions & 0 deletions tools/sz_repo_cli/lib/src/commands/src/build_app_command.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright (c) 2022 Sharezone UG (haftungsbeschränkt)
// Licensed under the EUPL-1.2-or-later.
//
// You may obtain a copy of the Licence at:
// https://joinup.ec.europa.eu/software/page/eupl
//
// SPDX-License-Identifier: EUPL-1.2

import 'package:sz_repo_cli/src/common/common.dart';

class BuildAppCommand extends CommandBase {
BuildAppCommand(super.context);

@override
String get description => 'Build the Sharezone app in release mode.';

@override
String get name => 'app';
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ final _iosFlavors = [
'dev',
];

class BuildIosCommand extends CommandBase {
BuildIosCommand(super.context) {
class BuildAppIosCommand extends CommandBase {
BuildAppIosCommand(super.context) {
argParser
..addOption(
releaseStageOptionName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ final _macOsFlavors = [
'dev',
];

class BuildMacOsCommand extends CommandBase {
BuildMacOsCommand(super.context) {
class BuildAppMacOsCommand extends CommandBase {
BuildAppMacOsCommand(super.context) {
argParser
..addOption(
releaseStageOptionName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ final _webFlavors = [
'dev',
];

class BuildWebCommand extends CommandBase {
BuildWebCommand(super.context) {
class BuildAppWebCommand extends CommandBase {
BuildAppWebCommand(super.context) {
argParser
..addOption(
releaseStageOptionName,
Expand Down
19 changes: 19 additions & 0 deletions tools/sz_repo_cli/lib/src/commands/src/deploy_app_command.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright (c) 2022 Sharezone UG (haftungsbeschränkt)
// Licensed under the EUPL-1.2-or-later.
//
// You may obtain a copy of the Licence at:
// https://joinup.ec.europa.eu/software/page/eupl
//
// SPDX-License-Identifier: EUPL-1.2

import 'package:sz_repo_cli/src/common/common.dart';

class DeployAppCommand extends CommandBase {
DeployAppCommand(super.context);

@override
String get description => 'Deploy the Sharezone app.';

@override
String get name => 'app';
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ final _iosFlavors = [
'prod',
];

/// [DeployIosCommand] provides functionality for deploying the Sharezone iOS
/// [DeployAppIosCommand] provides functionality for deploying the Sharezone iOS
/// app to the App Store or TestFlight.
///
/// This command automatically increments the build number and builds the app.
Expand All @@ -49,8 +49,8 @@ final _iosFlavors = [
/// These options can either be provided via the command line or set as
/// environment variables (only applies for some of them). If any required
/// argument is missing, the deployment will fail.
class DeployIosCommand extends CommandBase {
DeployIosCommand(super.context) {
class DeployAppIosCommand extends CommandBase {
DeployAppIosCommand(super.context) {
argParser
..addOption(
releaseStageOptionName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ final _macOsFlavors = [
'dev',
];

/// [DeployMacOsCommand] provides functionality for deploying the Sharezone macOS
/// [DeployAppMacOsCommand] provides functionality for deploying the Sharezone macOS
/// app to the App Store or TestFlight.
///
/// This command automatically increments the build number and builds the app.
Expand All @@ -53,8 +53,8 @@ final _macOsFlavors = [
/// These options can either be provided via the command line or set as
/// environment variables (only applies for some of them). If any required
/// argument is missing, the deployment will fail.
class DeployMacOsCommand extends CommandBase {
DeployMacOsCommand(super.context) {
class DeployAppMacOsCommand extends CommandBase {
DeployAppMacOsCommand(super.context) {
argParser.addOption(
releaseStageOptionName,
abbr: 's',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ final _webFlavors = [
///
/// The command will automatically use the right firebase config as configured
/// inside [_stageToTarget].
class DeployWebAppCommand extends CommandBase {
DeployWebAppCommand(super.context) {
class DeployAppWebCommand extends CommandBase {
DeployAppWebCommand(super.context) {
argParser
..addOption(
releaseStageOptionName,
Expand Down
34 changes: 19 additions & 15 deletions tools/sz_repo_cli/lib/src/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,20 @@ import 'package:args/command_runner.dart';
import 'package:file/local.dart';
import 'package:process_runner/process_runner.dart';
import 'package:sz_repo_cli/src/commands/src/add_license_headers_command.dart';
import 'package:sz_repo_cli/src/commands/src/build_android_command.dart';
import 'package:sz_repo_cli/src/commands/src/build_app_android_command.dart';
import 'package:sz_repo_cli/src/commands/src/build_app_command.dart';
import 'package:sz_repo_cli/src/commands/src/build_command.dart';
import 'package:sz_repo_cli/src/commands/src/build_ios_command.dart';
import 'package:sz_repo_cli/src/commands/src/build_macos_command.dart';
import 'package:sz_repo_cli/src/commands/src/build_app_ios_command.dart';
import 'package:sz_repo_cli/src/commands/src/build_app_macos_command.dart';
import 'package:sz_repo_cli/src/commands/src/build_runner_build_command.dart';
import 'package:sz_repo_cli/src/commands/src/build_runner_command.dart';
import 'package:sz_repo_cli/src/commands/src/build_web_command.dart';
import 'package:sz_repo_cli/src/commands/src/build_app_web_command.dart';
import 'package:sz_repo_cli/src/commands/src/build_website_command.dart';
import 'package:sz_repo_cli/src/commands/src/check_license_headers_command.dart';
import 'package:sz_repo_cli/src/commands/src/deploy_android_command.dart';
import 'package:sz_repo_cli/src/commands/src/deploy_ios_command.dart';
import 'package:sz_repo_cli/src/commands/src/deploy_macos_command.dart';
import 'package:sz_repo_cli/src/commands/src/deploy_app_android_command.dart';
import 'package:sz_repo_cli/src/commands/src/deploy_app_command.dart';
import 'package:sz_repo_cli/src/commands/src/deploy_app_ios_command.dart';
import 'package:sz_repo_cli/src/commands/src/deploy_app_macos_command.dart';
import 'package:sz_repo_cli/src/commands/src/deploy_website_command.dart';
import 'package:sz_repo_cli/src/commands/src/format_command.dart';
import 'package:sz_repo_cli/src/commands/src/license_headers_command.dart';
Expand Down Expand Up @@ -65,16 +67,18 @@ Future<void> main(List<String> args) async {
..addSubcommand(CheckLicenseHeadersCommand(context))
..addSubcommand(AddLicenseHeadersCommand(context)))
..addCommand(DeployCommand()
..addSubcommand(DeployWebAppCommand(context))
..addSubcommand(DeployIosCommand(context))
..addSubcommand(DeployMacOsCommand(context))
..addSubcommand(DeployAndroidCommand(context))
..addSubcommand(DeployAppCommand(context)
..addSubcommand(DeployAppWebCommand(context))
..addSubcommand(DeployAppIosCommand(context))
..addSubcommand(DeployAppMacOsCommand(context))
..addSubcommand(DeployAndroidCommand(context)))
..addSubcommand(DeployWebsiteCommand(context)))
..addCommand(BuildCommand()
..addSubcommand(BuildAndroidCommand(context))
..addSubcommand(BuildMacOsCommand(context))
..addSubcommand(BuildWebCommand(context))
..addSubcommand(BuildIosCommand(context))
..addSubcommand(BuildAppCommand(context)
..addSubcommand(BuildAppAndroidCommand(context))
..addSubcommand(BuildAppMacOsCommand(context))
..addSubcommand(BuildAppWebCommand(context))
..addSubcommand(BuildAppIosCommand(context)))
..addSubcommand(BuildWebsiteCommand(context)))
..addCommand(
BuildRunnerCommand()..addSubcommand(BuildRunnerBuild(context)));
Expand Down
2 changes: 1 addition & 1 deletion website/web/robots_dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File will be renamed to robots.txt when deploying with "sz deploy web"
# File will be renamed to robots.txt when deploying with "sz deploy website"
User-agent: *
# Disallow all because the dev website should not be indexed by search engines
Disallow: /
Expand Down
2 changes: 1 addition & 1 deletion website/web/robots_prod.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File will be renamed to robots.txt when deploying with "sz deploy web"
# File will be renamed to robots.txt when deploying with "sz deploy website"
User-agent: *
Allow: /

Expand Down
Loading