A command line tool management method, device and equipment

CN116048525BActive Publication Date: 2026-10-20ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310094087.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-12
Publication Date
2026-10-20
Estimated Expiration
2043-01-12

AI Technical Summary

Technical Problem

对于命令行工具的多个不同的开发者而言,一些工具类的函数往往在他们之间重复实现,他们各自开发的命令行工具也往往缺乏统一的架构、标准和统一的调试方式,整体管理不便

Benefits of technology

[0008]在第四方面,本说明书实施例提供一种非易失性计算机存储介质存储有计算机可执行指令,当计算机读取存储介质中的计算机可执行指令后,该指令使得一个或多个处理器执行如第一方面所述的方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116048525B_ABST
    Figure CN116048525B_ABST
Patent Text Reader

Abstract

The embodiment of the present specification discloses a kind of management method, device and equipment of command line tool.Thereby receiving the command line code uploaded by publisher;Compile the temporary resource package generated by the command line code;Obtain the configuration information of code to be published, according to the configuration information and the temporary resource package, build target resource package;The target resource package is published, so as to realize the centralized unified management of different command line tools, and publisher only needs to provide corresponding code and configuration information to platform, i.e.can generate standard target resource package and publish.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of Internet technology, and in particular to management methods, apparatus, and devices based on a command-line tool. Background Technology

[0002] Command-line tools are tools that can be used in a user terminal environment and can be implemented in different programming languages. Within organizations, there are often many different developers creating different command-line tools. For these multiple developers, some utility functions are often implemented repeatedly, and their respective command-line tools often lack a unified architecture, standards, and unified debugging methods, making overall management inconvenient.

[0003] Therefore, an efficient management solution for command-line tools is needed. Summary of the Invention

[0004] This specification provides a method, apparatus, device, and storage medium for managing command-line tools, in order to solve the following technical problem: the need for an efficient management solution for command-line tools.

[0005] To solve the above-mentioned technical problems, one or more embodiments of this specification are implemented as follows: In a first aspect, embodiments of this specification provide a method for managing command-line tools, the method comprising: receiving command-line code uploaded by a publisher; compiling the command-line code to generate a temporary resource package; obtaining configuration information of code to be published; constructing a target resource package based on the configuration information and the temporary resource package; and publishing the target resource package.

[0006] In a second aspect, embodiments of this specification provide a management device for a command-line tool. The device includes: a receiving module for receiving command-line code uploaded by a publisher; a compilation module for compiling the command-line code to generate a temporary resource package; a building module for obtaining configuration information of the code to be published and building a target resource package based on the configuration information and the temporary resource package; and a publishing module for publishing the target resource package.

[0007] In a third aspect, one or more embodiments of this specification provide an electronic device, comprising: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method as described in the first aspect.

[0008] In a fourth aspect, embodiments of this specification provide a non-volatile computer storage medium storing computer-executable instructions, which, when read by a computer from the storage medium, cause one or more processors to perform the method described in the first aspect.

[0009] The above-described at least one technical solution adopted in one or more embodiments of this specification can achieve the following beneficial effects: by receiving command line code uploaded by the publisher; compiling the command line code to generate a temporary resource package; obtaining the configuration information of the code to be published; constructing a target resource package based on the configuration information and the temporary resource package; and publishing the target resource package, a centralized and unified management of different command line tools can be achieved. The publisher only needs to provide the platform with the corresponding code and configuration information to generate a standard target resource package and publish it, thereby achieving unified management of different command line tools and improving the publisher's work efficiency and experience. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 A flowchart illustrating a method for managing a command-line tool as provided in an embodiment of this specification; Figure 2 This is a schematic diagram of the structure of a management platform provided in the embodiments of this specification; Figure 3 A timing diagram illustrating resource publishing by a software publisher in a management platform, provided as an embodiment of this specification. Figure 4 This is a timing diagram illustrating the interaction between a software user executing a command-line tool and a management platform, as provided in an embodiment of this specification. Figure 5 A schematic diagram of the structure of a management device for a command-line tool provided in an embodiment of this specification; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. Detailed Implementation

[0012] This specification provides a method, apparatus, device, and storage medium for managing command-line tools.

[0013] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.

[0014] Compared to graphical user interface applications, command-line tools lack graphical elements and are primarily text-based. Due to their more efficient workflow and simpler interface, command-line tools are popular among developers and widely used. Currently, many command-line tools exist, but their development and release are largely independent, lacking a unified framework and standard. This actually brings inconvenience to the management of command-line tools (including release, use, and testing, etc.). Therefore, this specification provides a management solution for command-line tools.

[0015] like Figure 1 As shown, Figure 1 A flowchart illustrating a method for managing a command-line tool provided in an embodiment of this specification includes: S101: Receive command-line code uploaded by the publisher.

[0016] like Figure 2 As shown in the embodiments of this specification, the management method is applied to a centralized management platform. Figure 2 This is a schematic diagram of the structure of a management platform provided in an embodiment of this specification. The centralized management platform in this architecture provides a Software Development Kit (SDK) to the developers of command-line tools (usually the code publishers). Each developer can obtain the SDK from the platform and then write code based on it. In other words, the management platform can simultaneously connect to multiple different developers and provide corresponding development environments.

[0017] S103, Compile the command line code to generate a temporary resource package.

[0018] After developers write command-line code based on this SDK, they can upload the code to the management platform in their development environment. The management platform will then compile the code to generate a usable temporary resource package (also known as a temporary version). This temporary version can also be temporarily released (i.e., uploaded to a public path for users to download), and relevant information about the temporary resource package will be returned to the publisher. This information may include details such as the path to the temporary resource package and the build time. S105, Obtain the configuration information of the code to be released, and construct the target resource package based on the configuration information and the temporary resource package.

[0019] After the software publisher obtains the aforementioned relevant information, they can perform tasks such as local debugging and testing on the temporary resource package. Once the temporary resource package has been tested and confirmed to be usable, the publisher can configure it accordingly, including feature configuration, deployment strategy configuration, integration method configuration, and canary release configuration, etc.

[0020] The function configuration is used to configure the functions of multiple toolkits contained in the temporary resource package. For example, if the command-line tool corresponding to the temporary resource package may contain functions A, B, and C, then the function configuration can be used to configure the usage permissions, usage environment, etc. of a specific function.

[0021] The deployment strategy configuration can be used to strategically configure the functionality of multiple toolkits included in a temporary resource package for users. For example, if the command-line tool corresponding to the temporary resource package may contain functions A, B, and C, the function configuration can be used to configure the usage permissions, usage environment, etc., of a specific function. For example, by default, functions A, B, and C may all have the lowest permissions (i.e., all users can use them), or, based on the configuration, function A may be configured to have higher permissions, so that only users with significantly higher permissions can use function A in the command-line tool.

[0022] The integration method configuration allows users to specify which toolkits should be included in the final target resource package, or how to integrate specific toolkits. For example, a temporary resource package may contain multiple independent functional applications X, Y, and Z. The integration method configuration can then be used to determine which functional applications should be included in the final target resource package, and how these functional applications should be integrated.

[0023] The canary deployment configuration can be used to determine how to distribute the update to users after release (i.e., whether to conduct a canary deployment). For example, it can be a canary deployment (i.e., updating on a subset of users and gradually transitioning to updating all users), or it can be a general update (i.e., updating on all users simultaneously).

[0024] The publisher's configuration information for the temporary resource package can be generated from the standard configuration interface provided by the management platform. For example, the management platform provides a configuration interface with multiple optional controls for the publisher to input information or select options. After obtaining this information, the management platform can parse and calculate the configuration information to generate the corresponding calculation results, and then fix the calculation results to generate a configuration image. Based on the configuration image, a mirror file containing the configuration information is built from the aforementioned temporary resource package, thus generating the target resource package.

[0025] In this approach, different software publishers can configure their temporary resource packages through a management platform. The management platform can then solidify the rules based on the configuration information provided by the software publishers, enabling unified publishing and management based on the solidified rules.

[0026] S107, Publish the target resource package.

[0027] After confirming that the code and functionality of the image file are correct, the publisher can confirm the publication again, thereby publicly releasing the target resource package through the platform. Figure 3 As shown, Figure 3 This is a timing diagram illustrating a software publisher publishing resources on a management platform, as provided in an embodiment of this specification.

[0028] After the official version (i.e., the target resource package) is released, software users can download the target resource package from the software repository, install it locally, and then run the command-line tool. Since the target resource package actually contains configuration information, during use, the command-line tool will perform pre-check operations locally based on this configuration information to obtain pre-check information (including version number, permission restrictions, and local configuration information, etc.). It will then further interact with the management platform based on this pre-check information to verify the configuration information and generate verification results. Based on these verification results, it will perform operations such as upgrading, disabling, and adding tracking points locally.

[0029] like Figure 4 As shown, Figure 4 This diagram illustrates the timing of the interaction between a software user executing a command-line tool and a management platform, as provided in an embodiment of this specification. In this diagram, software installation is actually a pre-completed process. Any command-line tool, upon execution, can perform a pre-check based on the aforementioned method, and complete verification by interacting with the management platform based on configuration information, thus achieving unified management.

[0030] By receiving command-line code uploaded by the publisher; compiling the command-line code to generate a temporary resource package; obtaining the configuration information of the code to be published; constructing a target resource package based on the configuration information and the temporary resource package; and publishing the target resource package, a centralized and unified management of different command-line tools can be achieved. The publisher only needs to provide the corresponding code and configuration information to the platform to generate a standard target resource package and publish it, thereby achieving unified management of different command-line tools and improving the publisher's work efficiency and experience.

[0031] In one embodiment, when the publisher obtains the configuration information of the code to be published and constructs a software resource package based on the configuration information and the temporary resource package, the management platform can determine the multiple application packages contained in the temporary resource package through compilation, and display the multiple application packages to the publisher in the form of control options for selection. Thus, the publisher can configure and upload the integration method of the application packages in the configuration information, and the management platform can then obtain the integration method of the application packages contained in the configuration information of the code to be published; and construct one or more target resource packages based on the integration method.

[0032] For example, if a temporary resource package contains application package 1, application package 2, and application package 3, the publisher can choose to integrate all application packages into one target resource package, or to integrate application package 2 and application package 3 into one target resource package, while integrating application package 1 into another target resource package.

[0033] In practical applications, the command-line tools executed by software users locally may not be up-to-date. This lack of up-to-dateness can manifest as the configuration information in the command-line tools executed locally by the software user not matching the configuration information contained in the target resource package. For example, this may include inconsistent permission configurations, version numbers that do not meet requirements, and command-line tools that have expired.

[0034] Therefore, in order to facilitate unified management of command-line tools by the publisher, when a software user (i.e., the user) executes a command-line tool, after completing the pre-check and obtaining the pre-check information, they can initiate a policy access request to the management platform. The policy access request is generated when the user runs the command-line tool corresponding to the target resource package. The policy access request generally also carries information such as version number, installation time, local permissions, etc.

[0035] The management platform can then perform configuration verification based on the policy access request and the configuration information, generate a verification result, and return the verification result to the user so that the user can execute the command-line tool based on the verification result. This configuration verification may include checks such as version verification, permission verification, and lifecycle verification.

[0036] For example, version verification can be achieved by the management platform obtaining the version number of the command-line tool included in the access request; comparing the version number of the command-line tool with the version number included in the configuration information; and generating a version verification result. Typically, the version number included in the configuration information is a minimum usable version number. If the version number of the command-line tool is less than the version number included in the configuration information, it can be assumed that the command-line tool executed by the software user is no longer usable or requires a forced update.

[0037] In this way, software publishers can conveniently and uniformly manage the command-line tools they publish for all software users. For example, if a software publisher needs to discontinue a command-line tool, they can configure a larger version number in the management platform, ensuring that no other command-line tool's version number can exceed this larger version number, thus achieving unified discontinuation of the command-line tool.

[0038] For example, software publishers can specify the lifecycle of any version (e.g., one month) in the configuration information. When the version number's lifecycle exceeds that, the command-line tool with that version number becomes unavailable.

[0039] For example, permission verification can be based on user identifiers. That is, the software publisher can pre-configure a whitelist in the management platform. The whitelist contains user identifiers and functional permissions. User identifiers in the whitelist are users who have at least some of the functional permissions, while user identifiers not in the whitelist do not have the permissions.

[0040] In this implementation, the command-line tool can obtain the local user's identifier during pre-check and upload it in the access request. The management platform can then obtain the user identifier contained in the access request and compare whether the user identifier matches the user identifier contained in the configuration information to generate a user permission verification result.

[0041] For example, software developers can pre-configure a whitelist rule as "open to people in department 1, open to people with employee number 011, and open specific functions a, b, c, and d". The management platform can then fix this rule in the form of a whitelist, so that a user in department 2 or a user with employee number 012 in department 1 cannot use functions a, b, c, and d in the software's command-line tool.

[0042] In one embodiment, if a command-line tool has a large user base, the management platform can determine how to update it based on the software publisher's configuration when the verification result indicates that the verification has passed. Specifically, the management platform obtains the gray-scale policy of the target resource package contained in the configuration information, generates a policy result corresponding to the user based on the gray-scale policy, and pushes the policy result to the user so that the user can update the command-line tool.

[0043] For example, software publishers can perform canary updates based on the user IDs of command-line tool users. If the remainder of the user ID divided by 5 is 1, a strategy result indicating an update is generated and pushed to the software user (the user), so that the user can update the command-line tool. If the remainder is any other number, a strategy result indicating no update is generated and pushed to the user. This method enables canary updates even when there are many users on the command-line tool, and is more stable.

[0044] In one embodiment, if the software publisher needs to perform instrumentation analysis on the command-line tool, it can push the strategy results for characterizing code instrumentation to the user, so that the user can perform code instrumentation on the command-line tool based on the strategy results and generate a command-line tool containing instrumentation code.

[0045] For example, software publishers can pre-configure relevant information into the management platform. Upon startup, the command-line tool can retrieve relevant code based on this configuration information and perform corresponding analysis and code instrumentation on the local command-line tool, thereby generating a new command-line tool containing instrumented code. Furthermore, the configuration information can specify the exact location of the instrumentation and the form of the instrumented code, etc.

[0046] In the embodiments of this specification, instrumentation refers to inserting other code (or instrumentation code) into the code of the command-line tool while ensuring the logical and functional integrity of the original command-line tool code. This other code collects information generated when the command-line tool is executed (such as the method itself, method parameter values, return values, etc.). By inserting other code at specific locations, dynamic context information of the command-line tool during runtime can be collected.

[0047] For example, the raw pseudocode form of a command-line tool might be: {A call is made to address xxx via port xx to request the value of data x}. That is, requesting data from a remote device.

[0048] The pseudocode form of the new code generated after code instrumentation might be: { Record the current system time t1; A call is made from port xx to address xxx to request the value of data x; Record the current system time t2.

[0049] } The phrases "record the current system time t1" and "record the current system time t2" are the inserted code. This inserted code obviously does not affect the execution of the original command-line tool's function of "calling the xxx address via port xx to request the value of data x".

[0050] In one embodiment, when a software user executes the command-line tool containing instrumentation code locally, the management platform can obtain the usage information generated by the command-line tool containing instrumentation code, analyze the usage information to generate analysis results, and send the analysis results to the publisher.

[0051] As shown in the previous example, by inserting other code, the management platform can calculate the specific time "t2-t1" for executing "a call is made from port xx to address xxx to request the value of data x". These analysis results are then displayed on the management platform or sent to the publisher, providing software publishers with unified anomaly analysis and data insight capabilities.

[0052] Based on the same idea, one or more embodiments of this specification also provide apparatus and devices corresponding to the above methods, such as... Figure 5 , Figure 6 As shown.

[0053] In the second aspect, such as Figure 5 As shown, Figure 5 This is a schematic diagram of a management device for a command-line tool provided in an embodiment of this specification. The device includes: Receive module 501 receives command-line code uploaded by the publisher; Compiler module 503 compiles the command-line code to generate a temporary resource package; Module 505 obtains the configuration information of the code to be released, and constructs the target resource package based on the configuration information and the temporary resource package; Module 507 publishes the target resource package.

[0054] Optionally, the construction module 505 determines the multiple application packages contained in the temporary resource package; obtains the integration method of the application packages contained in the configuration information of the code to be released; and constructs one or more target resource packages according to the integration method.

[0055] Optionally, the device further includes a verification module 509, which receives a policy access request from the user, wherein the policy access request is generated when the user runs the command-line tool corresponding to the target resource package; performs configuration verification according to the policy access request and the configuration information, generates a verification result; and returns the verification result to the user so that the user can execute the command-line tool according to the verification result.

[0056] Optionally, the verification module 509 obtains the version number of the command-line tool included in the access request; compares the version number of the command-line tool with the version number included in the configuration information, and generates a version verification result.

[0057] Optionally, the verification module 509 obtains the user identifier contained in the access request; compares whether the user identifier matches the user identifier contained in the configuration information, and generates a user permission verification result.

[0058] Optionally, the device further includes an update module 511, which obtains the grayscale policy of the target resource package contained in the configuration information, generates a policy result corresponding to the user based on the grayscale policy, and pushes the policy result to the user so that the user can update the command line tool.

[0059] Optionally, the update module 511 pushes the strategy results for characterizing code instrumentation to the user, so that the user can perform code instrumentation on the command-line tool based on the strategy results and generate a command-line tool containing instrumentation code.

[0060] Optionally, the device further includes an analysis module 513, which acquires usage information generated by the command-line tool containing instrumentation code, analyzes the usage information to generate analysis results, and sends the analysis results to the publisher.

[0061] In the third aspect, such as Figure 6 As shown, Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. The device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method as described in the first aspect.

[0062] In a fourth aspect, based on the same idea, embodiments of this specification also provide a non-volatile computer storage medium corresponding to the above method, storing computer-executable instructions, which, when read by a computer from the storage medium, cause one or more processors to execute the method described in the first aspect.

[0063] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must also be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also understand that by simply performing some logic programming on the method flow using one of these hardware description languages ​​and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.

[0064] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0065] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0066] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.

[0067] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the embodiments of this specification can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0068] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0069] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0070] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0071] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0072] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0073] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0074] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0075] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0076] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, devices, and non-volatile computer storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0077] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0078] The above description is merely one or more embodiments of this specification and is not intended to limit this specification. Various modifications and variations can be made to the one or more embodiments of this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of one or more embodiments of this specification should be included within the scope of the claims of this specification.

Claims

1. A method for managing command-line tools, the method comprising: Receive command-line code uploaded by the publisher; Compile the command-line code to generate a temporary resource package; Obtain the configuration information of the code to be released, and construct the target resource package based on the configuration information and the temporary resource package; Release the target resource package; The method further includes: obtaining the grayscale policy of the target resource package contained in the configuration information, and generating the corresponding policy result for the user based on the grayscale policy; The strategy results, which characterize code instrumentation, are pushed to the user so that the user can instrument the command-line tool based on the strategy results and generate a command-line tool containing instrumented code.

2. The method as described in claim 1, wherein, Obtain the configuration information of the code to be released, and construct a software resource package based on the configuration information and the temporary resource package, including: Identify the multiple application packages contained in the temporary resource package; Obtain the integration method of the application package contained in the configuration information of the code to be released; The integration method described herein constitutes one or more target resource packages.

3. The method as described in claim 1, wherein, The method further includes: Receive a policy access request from the user, wherein the policy access request is generated when the user runs the command-line tool corresponding to the target resource package; Perform configuration verification based on the policy access request and the configuration information, and generate verification results; The verification result is returned to the user so that the user can execute the command-line tool based on the verification result.

4. The method of claim 3, wherein, Based on the policy access request and the configuration information, a configuration verification is performed, and a verification result is generated, including: Obtain the version number of the command-line tool included in the policy access request; The version number of the command-line tool is compared with the version number contained in the configuration information to generate a version verification result.

5. The method of claim 3, wherein, Based on the policy access request and the configuration information, a configuration verification is performed, and a verification result is generated, including: Obtain the user identifier contained in the policy access request; Compare whether the user identifier matches the user identifier contained in the configuration information to generate a user permission verification result.

6. The method of claim 3, wherein, The method further includes: Obtain the grayscale policy of the target resource package contained in the configuration information, and generate the corresponding policy result for the user based on the grayscale policy; The policy results are pushed to the user so that the user can update the command-line tool.

7. The method of claim 1, wherein, The method further includes: Obtain the usage information generated by the command-line tool containing instrumentation code, analyze the usage information to generate analysis results, and send the analysis results to the publisher.

8. A management device for a command-line tool, the device comprising: The receiving module receives command-line codes uploaded by the publisher; The compilation module compiles the command-line code to generate a temporary resource package; The module builds the target resource package by obtaining the configuration information of the code to be released and by constructing the target resource package based on the configuration information and the temporary resource package. The publishing module publishes the target resource package; The device also performs the following: obtaining the grayscale strategy of the target resource package contained in the configuration information, and generating the corresponding strategy result for the user based on the grayscale strategy; The strategy results, which characterize code instrumentation, are pushed to the user so that the user can instrument the command-line tool based on the strategy results and generate a command-line tool containing instrumented code.

9. An electronic device, comprising: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and system for automatically releasing software package

    CN105373401A

  • Software package release method and system based on multi-language environment

    CN106528170A