-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from knoeone/feature/submit-build
Feature/submit build
- Loading branch information
Showing
6 changed files
with
86 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Sample workflow for building and deploying a Jekyll site to GitHub Pages | ||
name: Deploy Jekyll with GitHub Pages dependencies preinstalled | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
channel: 'stable' | ||
architecture: x64 | ||
- run: flutter config --enable-macos-desktop | ||
- run: flutter build macos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
part of 'soundset.dart'; | ||
|
||
extension SoundSetPublish on SoundSet { | ||
Future publish() async { | ||
var appTempDir = 'soundsets'; | ||
|
||
final Directory tempDir = await getTemporaryDirectory(); | ||
var hash = sha1.convert(utf8.encode(name)).toString(); | ||
|
||
var tmpDirName = p.join(tempDir.path, appTempDir, hash, '${name}.eragesoundset'); | ||
|
||
try { | ||
await Directory(p.join(tempDir.path, appTempDir, hash)).delete(recursive: true); | ||
} catch (e) { | ||
print(e); | ||
} | ||
|
||
try { | ||
await Directory(tmpDirName).create(recursive: true); | ||
} catch (e) { | ||
print(e); | ||
} | ||
|
||
var files = [ | ||
plist!['SoundFile_MailError'], | ||
plist!['SoundFile_MailSent'], | ||
plist!['SoundFile_NewMail'], | ||
plist!['SoundFile_NoMail'], | ||
plist!['SoundFile_Reminder'], | ||
plist!['SoundFile_Welcome'], | ||
plist!['ImageFile_Icon'], | ||
'soundset.plist', | ||
'README.md', | ||
]; | ||
|
||
void copyFile(assetFilePath) => File( | ||
p.join( | ||
path as String, | ||
assetFilePath, | ||
), | ||
).copySync( | ||
p.join( | ||
tmpDirName, | ||
assetFilePath, | ||
), | ||
); | ||
|
||
for (var file in files) { | ||
try { | ||
copyFile(file); | ||
} catch (e) { | ||
print(e); | ||
} | ||
} | ||
|
||
return DownloaderSendResponse( | ||
files: files, | ||
path: p.join(tempDir.path, appTempDir, hash), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters