1- const core = require ( " @actions/core" )
2- const exec = require ( " @actions/exec" )
1+ const core = require ( ' @actions/core' )
2+ const exec = require ( ' @actions/exec' )
33
44// FIXME: get this from the outputs of the flatpak-builder action
5- const LOCAL_REPO_NAME = "repo"
6-
5+ const LOCAL_REPO_NAME = 'repo'
76
87const run = ( repository , flatManagerUrl , token ) => {
9- exec . exec ( 'flatpak' , [
10- 'build-update-repo' ,
11- '--generate-static-deltas' ,
12- LOCAL_REPO_NAME ,
13- ] )
8+ exec . exec ( 'flatpak' , [
9+ 'build-update-repo' ,
10+ '--generate-static-deltas' ,
11+ LOCAL_REPO_NAME
12+ ] )
1413 . then ( async ( ) => {
15- const buildId = await exec . exec ( 'flat-manager-client' , [
16- '--token' ,
17- token ,
18- 'create' ,
19- flatManagerUrl ,
20- repository ,
21- ] )
22- return buildId
14+ const buildId = await exec . exec ( 'flat-manager-client' , [
15+ '--token' ,
16+ token ,
17+ 'create' ,
18+ flatManagerUrl ,
19+ repository
20+ ] )
21+ return buildId
2322 } )
2423 . then ( async ( buildId ) => {
25- await exec . exec ( 'flat-manager-client' , [
26- '--token' ,
27- token ,
28- 'push' ,
29- '--commit' ,
30- '--publish' ,
31- '--wait' ,
32- buildId ,
33- LOCAL_REPO_NAME ,
34- ] )
35- return buildId
24+ await exec . exec ( 'flat-manager-client' , [
25+ '--token' ,
26+ token ,
27+ 'push' ,
28+ '--commit' ,
29+ '--publish' ,
30+ '--wait' ,
31+ buildId ,
32+ LOCAL_REPO_NAME
33+ ] )
34+ return buildId
3635 } )
3736 . then ( async ( buildId ) => {
38- await exec . exec ( 'flat-manager-client' , [
39- 'purge' ,
40- buildId ,
41- ] )
37+ await exec . exec ( 'flat-manager-client' , [
38+ 'purge' ,
39+ buildId
40+ ] )
4241 } )
4342 . catch ( ( err ) => {
44- core . setFailed ( `Failed to publish the build: ${ err } ` )
43+ core . setFailed ( `Failed to publish the build: ${ err } ` )
4544 } )
4645}
4746
4847if ( require . main === module ) {
49- run (
50- core . getInput ( 'repository' ) ,
51- core . getInput ( 'flat-manager-url' ) ,
52- core . getInput ( 'token' )
53- )
54- }
48+ run (
49+ core . getInput ( 'repository' ) ,
50+ core . getInput ( 'flat-manager-url' ) ,
51+ core . getInput ( 'token' )
52+ )
53+ }
0 commit comments