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

[SR-9441] Option for preserving environment variables during regeneration of an Xcode project #4883

Closed
swift-ci opened this issue Dec 7, 2018 · 1 comment

Comments

@swift-ci
Copy link
Contributor

swift-ci commented Dec 7, 2018

Previous ID SR-9441
Radar None
Original Reporter smartello (JIRA User)
Type Improvement
Additional Detail from JIRA
Votes 1
Component/s Package Manager
Labels Improvement, GeneratedXcodeProject, Screened
Assignee None
Priority Medium

md5: 357d0752df0d3778cbfd528b5a830d93

Issue Description:

`swift package generate-xcodeproj` now creates LaunchAction in the schema file (SchemesGenerator.swift:190). LaunchAction contains Environment variables if they are defined in the project:

</BuildableProductRunnable>
<EnvironmentVariables>
  <EnvironmentVariable
    key = "NAME"
    value = "XCode based instance"
    isEnabled = "YES">
  </EnvironmentVariable>
  ...
</EnvironmentVariables>
<AdditionalOptions>

These variables are convenient for configuration data like database credentials or verbose level that are overwritten later by docker-compose.yml (or any other tool). With this approach we have a single codeline for every deployment.

When there is a new dependency in Package.swift, xcode project must be regenerated. Right now the project is generated from scratch. Instead, package manager can check if the xcodeproj (now obsolete) is available and if the schema file contains LaunchAction and EnvironmentVariables inside. If it's the case, it can pass the set of variables to Schema Generator.

This behavior may be closed by additional flag, e.g. `swift package generate-xcodeproj --preserve_environment_vars

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
@ikesyo
Copy link
Collaborator

ikesyo commented Mar 25, 2024

generate-xcodeproj command doesn't exist anymore. Closing.

@ikesyo ikesyo closed this as not planned Won't fix, can't repro, duplicate, stale Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants