fix: feedback token injected during ci
Github expires token in source code so we have to hide it away in CI (for now)
This commit is contained in:
1 parent
debd3aecb8
commit
effdc5f467
5 files changed
+9
-5
No files matched your search
+1
-1
@@ -17,7 +17,7 @@ script:
|
||||
- npm ci
|
||||
- npx commitlint-travis
|
||||
- if [ $IS_RELEASE ]; then scripts/determine_version_and_changelog.sh; fi
|
||||
- if [ $IS_RELEASE ]; then scripts/set_version_in_app.sh; fi
|
||||
- if [ $IS_RELEASE ]; then scripts/replace_environment_variables_in_app.sh; fi
|
||||
- pod install
|
||||
- scripts/import_codesign_certificate_into_keychain.sh
|
||||
- xcodebuild -workspace alt-tab-macos.xcworkspace -scheme Release
|
||||
|
||||
@@ -38,5 +38,7 @@
|
||||
<string>true</string>
|
||||
<key>SUPublicEDKey</key>
|
||||
<string>2e9SQOBoaKElchSa/4QDli/nvYkyuDNfynfzBF6vJK4=</string>
|
||||
<key>FeedbackToken</key>
|
||||
<string>#FEEDBACK_TOKEN#</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -140,7 +140,7 @@
|
||||
D04BAC159731F80FDAF4EA6C /* 1-row.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "1-row.jpg"; sourceTree = "<group>"; };
|
||||
D04BAC2FEF7248B7BF9579E2 /* CollectionViewFlowLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionViewFlowLayout.swift; sourceTree = "<group>"; };
|
||||
D04BAC34CFD42A7F6F1F01C0 /* CGWindow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CGWindow.swift; sourceTree = "<group>"; };
|
||||
D04BAC6AFC7F06D1A567F27A /* set_version_in_app.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = set_version_in_app.sh; sourceTree = "<group>"; };
|
||||
D04BAC6AFC7F06D1A567F27A /* replace_environment_variables_in_app.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = replace_environment_variables_in_app.sh; sourceTree = "<group>"; };
|
||||
D04BACABD048E62EBE4576CC /* DebugProfile.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DebugProfile.swift; sourceTree = "<group>"; };
|
||||
D04BACD976030676FD0761D5 /* Windows.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Windows.swift; sourceTree = "<group>"; };
|
||||
D04BACE22DC907F03D193075 /* ShortcutsTab.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ShortcutsTab.swift; sourceTree = "<group>"; };
|
||||
@@ -396,7 +396,7 @@
|
||||
children = (
|
||||
D04BA7ECCE728582D9ECA613 /* determine_version_and_changelog.sh */,
|
||||
D04BA4B5292629AA6B560216 /* package_and_notarize_release.sh */,
|
||||
D04BAC6AFC7F06D1A567F27A /* set_version_in_app.sh */,
|
||||
D04BAC6AFC7F06D1A567F27A /* replace_environment_variables_in_app.sh */,
|
||||
D04BAE93A5854C501639C640 /* update_homebrew_cask.sh */,
|
||||
D04BA5E819181CB83C5602C7 /* generate_selfsigned_codesign_certificate.sh */,
|
||||
D04BA0AAAE82C72855DBBA26 /* update_appcast.sh */,
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
set -exu
|
||||
|
||||
version="$(cat $VERSION_FILE)"
|
||||
# set the version in the app meta-data for the AppStore and app "Get Info" panel
|
||||
|
||||
sed -i '' -e "s/#VERSION#/$version/" Info.plist
|
||||
sed -i '' -e "s/#FEEDBACK_TOKEN#/$FEEDBACK_TOKEN/" Info.plist
|
||||
@@ -1,6 +1,7 @@
|
||||
import Cocoa
|
||||
|
||||
class FeedbackWindow: NSWindow {
|
||||
static let token = Bundle.main.object(forInfoDictionaryKey: "FeedbackToken") as! String
|
||||
var body: TextArea!
|
||||
var email: TextArea!
|
||||
var sendButton: NSButton!
|
||||
@@ -83,7 +84,7 @@ class FeedbackWindow: NSWindow {
|
||||
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
|
||||
request.addValue("application/json", forHTTPHeaderField: "Accept")
|
||||
// access token of the alt-tab-macos-bot github account, with scope repo > public_repo
|
||||
request.addValue("token 231413d7bf0e6cc533aae851c83dca25afed86bb", forHTTPHeaderField: "Authorization")
|
||||
request.addValue("token " + FeedbackWindow.token, forHTTPHeaderField: "Authorization")
|
||||
request.httpBody = try! JSONSerialization.data(withJSONObject: [
|
||||
"title": "[In-app feedback]",
|
||||
"body": assembleBody()
|
||||
|
||||
Reference in new issue
Block a user