Skip to content

Commit c8119b7

Browse files
mgmt, codegen related changes (Azure#22770)
* mgmt, codegen, add argument for additional autorest options * update script * update changelog gen to match new guide * update codegen version
1 parent af9f651 commit c8119b7

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

eng/mgmt/automation/generate.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def generate(
3737
use: str,
3838
tag: str = None,
3939
version: str = None,
40+
autorest_options: str = '',
4041
**kwargs,
4142
):
4243
module = ARTIFACT_FORMAT.format(service)
@@ -62,7 +63,7 @@ def generate(
6263
os.path.abspath(sdk_root),
6364
os.path.abspath(output_dir),
6465
namespace,
65-
' '.join((tag_option, version_option, FLUENTLITE_ARGUMENTS, readme)),
66+
' '.join((tag_option, version_option, FLUENTLITE_ARGUMENTS, autorest_options, readme)),
6667
)
6768
logging.info(command)
6869
if os.system(command) != 0:
@@ -491,6 +492,11 @@ def parse_args() -> argparse.Namespace:
491492
default = AUTOREST_CORE_VERSION,
492493
help = 'Autorest version',
493494
)
495+
parser.add_argument(
496+
'--autorest-options',
497+
default = '',
498+
help = 'Additional autorest options',
499+
)
494500
parser.add_argument('--suffix', help = 'Suffix for namespace and artifact')
495501
parser.add_argument(
496502
'--auto-commit-external-change',

eng/mgmt/automation/generation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ steps:
3434
- bash: |
3535
export PATH=$JAVA_HOME_11_X64/bin:$PATH
3636
java -version
37-
./eng/mgmt/automation/generate.py --readme "$(README)" --tag "$(TAG)" --service "$(SERVICE)" --version "$(VERSION)" --suffix "$(SUFFIX)" --auto-commit-external-change --user-name "azure-sdk" --user-email "[email protected]"
37+
./eng/mgmt/automation/generate.py --readme "$(README)" --tag "$(TAG)" --autorest-options="$(AUTOREST_OPTIONS)" --service "$(SERVICE)" --version "$(VERSION)" --suffix "$(SUFFIX)" --auto-commit-external-change --user-name "azure-sdk" --user-email "[email protected]"
3838
displayName: Generation
3939

4040
- template: /eng/common/pipelines/templates/steps/create-pull-request.yml

eng/mgmt/automation/parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
SDK_ROOT = '../../../' # related to file dir
1818
AUTOREST_CORE_VERSION = '3.1.3'
19-
AUTOREST_JAVA = '@autorest/[email protected].30'
19+
AUTOREST_JAVA = '@autorest/[email protected].31'
2020
DEFAULT_VERSION = '1.0.0-beta.1'
2121
GROUP_ID = 'com.azure.resourcemanager'
2222
API_SPECS_FILE = 'api-specs.yaml'

eng/mgmt/changelog/src/main/java/com/azure/resourcemanager/tools/changelog/Main.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
import java.util.stream.Stream;
2121

2222
public class Main {
23-
private final static String BREAKING_CHANGE_TITLE = "### Breaking Change\n\n";
24-
private final static String NEW_FEATURE_TITLE = "### New Feature\n\n";
23+
private final static String BREAKING_CHANGE_TITLE = "### Breaking Changes\n\n";
24+
private final static String NEW_FEATURE_TITLE = "### Features Added\n\n";
2525

2626
public static void main(String[] args) throws Exception {
2727
String oldJar = System.getProperty("OLD_JAR");

sdk/resourcemanager/tools/changelog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def main():
5353
current_changelog = left if left.strip() else '\n\n- Migrated from previous sdk\n'
5454
else:
5555
left = left[:second_version.start()]
56-
current_changelog = left if left.strip() else '\n\n- Updated core dependency from resources\n'
56+
current_changelog = left if left.strip() else '\n\n### Dependency Updates\n\n- Updated core dependency from resources\n'
5757

5858
version: str = first_version.group().replace(
5959
first_version.group(2), str(date)).replace(

0 commit comments

Comments
 (0)