Code Monkey home page Code Monkey logo

bitrise-init's Introduction

Bitrise Init

This repository hosts the bitrise-init which contains all the shared project detection and config generation logic.

This package ia consumed by the following tools:

How to release new bitrise-init version

  • update the step versions in steps/const.go
    • go get -u github.com/godrei/stepper
    • stepper stepLatests --steps-const-file="steps/const.go"
    • copy the output after “Generated” to the const.go file
  • bump version in version/version.go
  • commit these changes & open PR
  • merge to master
  • create tag with the new version
  • test the generated release and its binaries

Update manual config on website

  • Use the included go app to generate the manual configuration:
~/path/to/bitrise-init ❯❯❯ cd _manual-config
~/p/t/b/_manual-config ❯❯❯ go run main.go
Generating manual config
Config saved to generated/result.yml
~/p/t/b/_manual-config ❯❯❯ 

This will generate the manual configuration yaml file to _manual-config/generated/result.yml.

  • Update the bitrise-init dependency
  • Share a new version into steplib
  • Update the bitrise-init dependency
  • Release a new version.
  • Update the bitrise-init dependency
  • Release a new version.

bitrise-init's People

Contributors

adborbas avatar benbitrise avatar bence1001 avatar birmacherakos avatar chreno avatar doomsayer13 avatar godrei avatar istvankovacs-bitrise avatar kdobmayer avatar lpusok avatar lszucs avatar ofalvai avatar renovate[bot] avatar shams-ahmed avatar szokezsolt avatar tothszabi avatar trapacska avatar vgaidarji avatar viktorbenei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bitrise-init's Issues

Cocoapods version won't be correctly detected

I was digging into the code in podfile.go while debugging a different issue and realized that calling GemVersionFromGemfileLock in GetWorkspaceProjectMap to get the version of Cocopoads used won't actually work as intended, because the cocoapods gem itself is not referenced in the Podfile.lock. Instead it appears that the Cocoapods version is specified at the end of the lock file in a line like COCOAPODS: 1.8.4. I'm not sure if this has been the consistent standard, but I imagine it has been for a while and should actually make parsing easier.

Support Swift Package Manager based project for macOS

Issue

I have a few projects for command line tools which use SPM, but this command bitrise init failed because SPM based project don't require to have xcodeproj file all the time.

It might be okay to generate xcodeproj file by running swift package generate-xcodeproj and then run bitrise init, but it's nicer not to be depends on xcodeproj only for SPM based project.

Please look at below example for directories by SPM for more details

Proposed approach

  1. Detect xcodeproj files as it is
  2. If there is no xcodeproj files, detect Package.swift next

This PR is my rough idea: #143

Remaining tasks

  • Polish approach to fix the issue
  • Create a sample project in bitrise-samples repository to add test code
  • Might need to parse Package.swift content?

Directories by SPM

- Sources
- Tests
- Package.resolved
- Package.swift
- *.xcodeproj(Optional)

init stuck at Platform detected

I have an ios project inside which I have a git submodule react-native project. After running init, the program is apparently stuck after printing Platform Detected to console.

This is the console output:

[15:07:54] Running scanners:

[15:07:54] Scanner: react-native-expo
[15:07:54] +------------------------------------------------------------------------------+
[15:07:54] |                                                                              |
[15:07:54] Collect package.json files
[15:07:56] 1 package.json file detected
[15:07:56] Filter relevant package.json files
[15:07:56] Searching for expo
[15:07:56] |                                                                              |
[15:07:56] +------------------------------------------------------------------------------+

[15:07:56] Scanner: react-native
[15:07:56] +------------------------------------------------------------------------------+
[15:07:56] |                                                                              |
[15:07:56] Collect package.json files
[15:07:57] 1 package.json file detected
[15:07:57] Filter relevant package.json files
[15:07:57] checking: submodules/react-native/package.json
[15:07:58] Filter relevant Xcode project files
[15:07:58] 2 Xcode ios project files found
[15:07:58] - dummy.xcodeproj
[15:07:58] - submodules/react-native/ios/dummy2.xcodeproj
[15:07:58] Platform detected

React Native npm module install should detect and use yarn

The React Native scanner seems to only use npm install here:

https://github.com/bitrise-core/bitrise-init/blob/master/scanners/reactnative/reactnative.go#L152

Our project uses yarn and has a yarn.lock file. This lockfile (legitimately) pins us to a specific version for one of our dependencies. The latest version of this package breaks our build. Modern versions of npm respect package-lock.json lockfiles, but not yarn.lock lockfiles. The scanner should check for the presence of a yarn.lock file and use yarn if present, otherwise, use npm.

Add possibility to create a scanner with no input values

All existing scanners (android, ios, cordova, fastlane, etc.) do have input variables.
Please add the possibility to add a new scanner which will require no input variables.

So basically, there should be a way to leave ScannerInterface#Options/ScannerInterface#DefaultOptions functions empty once overriden or to have default implementation for them so that classes which implement ScannerInterface are not forced to provide any inputs if there're no inputs required for a scanner.

I've tried to use default implementation of those methods by simply providing new OptionModel objects, but it didn't work.

// Options ...
func (scanner *Scanner) Options() (models.OptionModel, models.Warnings, error) {
	return models.OptionModel{}, nil, nil
}

// DefaultOptions ...
func (Scanner) DefaultOptions() models.OptionModel {
	return models.OptionModel{}
}

It still requires inputs when bitrise-init config command is executed in CLI:

[14:18:52] scan dir: ./
[14:18:52] output dir: ./_scan_result
[14:18:52] output format: yaml

[14:18:52] Running scanners:

# OTHER SCANNERS HERE

[14:18:52] Scanner: jekyll
[14:18:52] +------------------------------------------------------------------------------+
[14:18:52] |                                                                              |
[14:18:52] Searching for _config.yml file
[14:18:52] _config.yml found
[14:18:52] Searching for Gemfile file
[14:18:52] Gemfile found
[14:18:52] Platform detected
[14:18:52] |                                                                              |
[14:18:52] +------------------------------------------------------------------------------+

[14:18:52] Collecting inputs:
Select:
Please select from the list:
(type in the option's number, then hit Enter) :
[14:18:58] Failed to ask for vale, error: failed to get input - scanner failed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.