我想project_dev
为3个分支和特定类型的标记设置我的CI,例如:dev_1.0,dev_1.1,dev_1.2.
我怎样才能做到这一点?
这就是我现在拥有的:
project_dev: stage: dev script: - export - bundle exec pod repo update - bundle exec pod install - bundle exec fastlane crashlytics_project_dev after_script: - rm -rf ~/Library/Developer/Xcode/Archives || true when: manual only: - develop - release - master - //here I need to add condition to fire that stage additionally only for specific tags. How can I setup regexp here? tags: - iOS
当我输入它时:
only: - branches - /^dev_[0-9.]*$/
它还为以下标记运行CI:dev1.2但它不应该.为什么?是否有标签的正则表达式?
我有一个Laravel 5项目,我们让用户下载.ai(插图文件)。问题是Laravel将.ai文件检测为application / pdf。
我正在使用此功能检测MIME类型
$type = File::mimeType( $_path );
Run Code Online (Sandbox Code Playgroud)
我也尝试使用这种方法,但是得到了相同的结果
$finfo = finfo_open(FILEINFO_MIME);
$mimetype = $finfo->file($_path);
finfo_close($finfo);
Run Code Online (Sandbox Code Playgroud)
我认为,PHP不知道什么是.ai文件是一个问题。我对finfo进行了更深入的研究,我了解默认的mime定义已编译到PHP中,但是我看到finfo_open具有第二个参数“ magic_file”,我认为这是您可以在其中插入其他mime定义文件的路径的地方。 。
我尝试使用Ubuntu的/etc/magic.mime文件,但finfo给了我
ErrorException: finfo_open(): Warning: offset `application\/activemessage' invalid in
Run Code Online (Sandbox Code Playgroud)
错误。我认为这是因为magic.mime文件的格式不正确。
在线上的大多数主题都会创建自定义PHP函数或其他一些技巧来检测mime类型,但我觉得这不是这里的正确解决方案。
在哪里可以找到最新的mime定义文件,如何将它们加载到PHP或finfo中?
我的环境:
Ubuntu 16.04
PHP 7.2
Run Code Online (Sandbox Code Playgroud)